数据装载过程中一直报错:
-f my.yml
2017-04-25 16:22:18|INFO| sesi bermula 2017-04-25 16:22:18
2017-04-25 16:22:18|INFO|setting schema 'public' for table 'test'
2017-04-25 16:22:18|INFO| memulakan gpfdist -p 8000 -P 8001 -f "/home/gpadmin/extend/test2." -t 30
2017-04-25 16:22:18||Ralat pemprosesan fail kawalan gpload berlaku. Konfigurasi mesti mengandungi gpload:input:quoteuntuk data berformat csv
2017-04-25 16:22:18|INFO|baris Dimasukkan = 0
2017-04-25 16:22:18|INFO|baris Dikemas kini = 0
2017 -04-25 16:22:18|INFO|ralat pemformatan data = 0
2017-04-25 16:22:18|INFO| gagal
my.yml内容:
---
VERSION: 1.0.0.1
DATABASE: ljlj-test
USER: gpadmin
HOST: mdw
PORT: 5432
:
INPUT:
- SOURCE:
LOCAL_HOSTNAME:
- mdw
PORT: 8000
:
- /home/gpadmin/extend/test2.
- COLUMNS:
- id: int
- pact_number: varchar(50)
- grant_type: varchar(50)
- ticket_usecode: varchar(100)
- pact_id: int
- FORMAT:
- DELIMITER: '|'
- ERROR_LIMIT: 25
- ERROR_TABLE: test_err
OUTPUT:
- TABLE: test
- MODE: INSERT
test2.内容:
6|102900928|product_conume|4290000100005|0
7|102900929|product_conume|3260000100006|0
的deug模式:
2017-04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk versi
2017-04-25 16:28:30|DEBUG|versi percubaan
2017-04-25:30 |DEBUG|versi ditemui
2017-04-25 16:28:30|INFO| sesi bermula 2017-04-25 16:28:30
2017-04-25 16:28:30|DEBUG|config {u'pangkalan data': u'ljlj-test', u'host': u'mdw', u'version': u'1.0.0.1', u'user': u'gpadmin', u'': {u'input': [{u'source': {u'local_hostname': [u'mdw' ], u'port': 8000, u'': [u'/home/gpadmin/extend/test2.']}}, {u'columns': [{u'id': u'int'}, { u'pact_number': u'varchar(50)'}, {u'grant_type': u'varchar(50)'}, {u'ticket_usecode': u'varchar(100)'}, {u'pact_id': u'int'}]}, {u'format': u''}, {u'delimiter': u'|'}, {u'error_limit': 25}, {u'error_table': u'test_err' }], u'output': [{u'table': u'test'}, {u'mode': u'INSERT'}]}, u'port': 5432}
2017-04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk :output
2017-04-25 16:28:30|DEBUG|mencuba
2017-04-25 16:28:30|DEBUG| 2017-04-25 16:28:30|DEBUG|mencuba output
2017-04-25 16:28:30|DEBUG|mendapati output
2017-04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk :output :table
2017-04-25 16:28:30|DEBUG|mencuba
2017-04-25 16:28:30|DEBUG|ditemui
2017-04-25 16:28:30|DEBUG|20 output percubaan
-04-25 16:28:30|DEBUG|output jumpa
2017-04-25 16:28:30|DEBUG|meja percubaan
2017-04-25 16:28:30|DEBUG|jadual jumpa
2017-04 -25 16:28:30|DEBUG|mendapatkan konfigurasi untuk hos
2017-04-25 16:28:30|DEBUG|mencuba hos
2017-04-25 16:28:30|DEBUG|menjumpai hos
2017-04 -25 16:28:30|DEBUG|mendapatkan konfigurasi untuk port
2017-04-25 16:28:30|DEBUG|mencuba port
2017-04-25 16:28:30|DEBUG|menjumpai port
2017-04 -25 16:28:30|DEBUG|mendapatkan konfigurasi untuk pengguna
2017-04-25 16:28:30|DEBUG|mencuba pengguna
2017-04-25 16:28:30|DEBUG|pengguna ditemui
2017-04 -25 16:28:30|DEBUG|mendapatkan konfigurasi untuk pangkalan data
2017-04-25 16:28:30|DEBUG|mencuba pangkalan data
2017-04-25 16:28:30|DEBUG|pangkalan data ditemui
2017-04 -25 16:28:30|DEBUG|mendapatkan konfigurasi untuk kata laluan
2017-04-25 16:28:30|DEBUG|mencuba kata laluan
2017-04-25 16:28:30|DEBUG|rentetan sambungan: user=gpadmin host=mdw port=5432 database=ljlj-test
2017-04-25 16:28:30|DEBUG|Berjaya disambungkan ke pangkalan data
2017-04-25 16:28:30|INFO|setting skema 'awam' untuk jadual 'ujian'
2017-04-25 16:28:30|DEBUG|lajur input ditemui: [u'"id"', u'integer', Tiada, Salah]
2017-04-25 16:28:30| DEBUG|lajur input ditemui: [u'"nombor_pakatan"', u'aksara berbeza-beza(50)', Tiada, Salah]
2017-04-25 16:28:30|DEBUG|lajur input ditemui: [u'"grant_type "', u'character varying(50)', None, False]
2017-04-25 16:28:30|DEBUG|ditemui lajur input: [u'"ticket_usecode"', u'character varying(100)' , Tiada, Palsu]
2017-04-25 16:28:30|DEBUG|lajur input ditemui: [u'"pact_id"', u'integer', None, False]
2017-04-25 16:28: 30|DEBUG|mendapatkan konfigurasi untuk :input:columns
2017-04-25 16:28:30|DEBUG|mencuba
2017-04-25 16:28:30|DEBUG|ditemui
2017-04-25 16:28 :30|DEBUG|mencuba input
2017-04-25 16:28:30|DEBUG|menjumpai input
2017-04-25 16:28:30|DEBUG|mencuba lajur
2017-04-25 16:28:30 |DEBUG|lajur ditemui
2017-04-25 16:28:30|DEBUG|daripada lajur ialah:
2017-04-25 16:28:30|DEBUG|id: int
2017-04-25 16:28: 30|DEBUG|nombor_pakatan: varchar(50)
2017-04-25 16:28:30|DEBUG|jenis_pemberian: varchar(50)
2017-04-25 16:28:30|DEBUG|kod_penggunaan tiket: varchar(1000)
2017-04-25 16:28:30|DEBUG|pact_id: int
2017-04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk :output:mapping
2017-04-25 16:28:30 DEBUG|mencuba
2017-04-25 16:28:30|DEBUG|ditemui
2017-04-25 16:28:30|DEBUG|mencuba output
2017-04-25 16:28:30|DEBUG|
2017-04-25 16:28:30|DEBUG|mencuba pemetaan
2017-04-25 16:28:30|DEBUG|"id": integer = "id"
2017-04-25 16:28:30 |DEBUG|"pact_number": character varying(50) = "pact_number"
2017-04-25 16:28:30|DEBUG|"grant_type": character varying(50) = "grant_type"
25-04-2017 16:28:30|DEBUG|"ticket_usecode": character varying(100) = "ticket_usecode"
2017-04-25 16:28:30|DEBUG|"pact_id": integer = "pact_id"
2017-04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk :input
2017-04-25 16:28:30|DEBUG|mencuba
2017-04-25 16:28:30|DEBUG2017|ditemui
-04-25 16:28:30|DEBUG|mencuba input
2017-04-25 16:28:30|DEBUG|input ditemui
2017-04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk :input: sumber(1)
2017-04-25 16:28:30|DEBUG|mencuba
2017-04-25 16:28:30|DEBUG|ditemui
2017-04-25 16:28:30|DEBUG|mencuba input
2017-04-25 16:28:30|DEBUG|input ditemui
2017-04-25 16:28:30|DEBUG|sumber percubaan(1)
2017-04-25 16:28:30|DEBUG|ditemui sumber
2017-04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk :input:source(1):local_hostname
2017-04-25 16:28:30|DEBUG|mencuba
2017-04-25 16: 28:30|DEBUG|ditemui
2017-04-25 16:28:30|DEBUG|mencuba input
2017-04-25 16:28:30|DEBUG|ditemui input
2017-04-25 16:28:30 |DEBUG|sumber percubaan(1)
2017-04-25 16:28:30|DEBUG|sumber ditemui
2017-04-25 16:28:30|DEBUG|mencuba local_hostname
2017-04-25 16:28: 30|DEBUG|mendapati local_hostname
2017-04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk :input:source:ssl
2017-04-25 16:28:30|DEBUG|mencuba
2017-04 16:28:30|DEBUG|ditemui
2017-04-25 16:28:30|DEBUG|mencuba input
2017-04-25 16:28:30|DEBUG|ditemui input
2017-04-25 16:28 :30|DEBUG|sumber mencuba
2017-04-25 16:28:30|DEBUG|sumber ditemui
2017-04-25 16:28:30|DEBUG|mencuba ssl
2017-04-25 16:28:30 |DEBUG|mendapatkan konfigurasi untuk :input:source:certificates_path
2017-04-25 16:28:30|DEBUG|mencuba
2017-04-25 16:28:30|DEBUG|ditemui
2017-04:-2 28:30|DEBUG|mencuba input
2017-04-25 16:28:30|DEBUG|menjumpai input
2017-04-25 16:28:30|DEBUG|mencuba sumber
2017-04-25 16:28: 30|DEBUG|sumber ditemui
2017-04-25 16:28:30|DEBUG|mencuba laluan_sijil
2017-04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk :input:source(1):port
2017 -04-25 16:28:30|DEBUG|mencuba
2017-04-25 16:28:30|DEBUG|ditemui
2017-04-25 16:28:30|DEBUG|mencuba input
2017-04-25 16:28:30|DEBUG|input ditemui
25-04-2017 16:28:30|DEBUG|sumber percubaan(1)
25-04-2017 16:28:30|DEBUG|sumber ditemui
2017-04- 25 16:28:30|DEBUG|mencuba port
2017-04-25 16:28:30|DEBUG|port ditemui
2017-04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk :input:source(1 ):port_range
2017-04-25 16:28:30|DEBUG|mencuba
2017-04-25 16:28:30|DEBUG|ditemui
2017-04-25 16:28:30|DEBUG|mencuba input
25-04-2017 16:28:30|DEBUG|input ditemui
2017-04-25 16:28:30|DEBUG|sumber percubaan(1)
25-04-2017 16:28:30|DEBUG|sumber ditemui
2017-04-25 16:28:30|DEBUG|mencuba port_range
2017-04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk :input:source(1):
2017-04-25 16:28 :30|DEBUG|mencuba
2017-04-25 16:28:30|DEBUG|ditemui
2017-04-25 16:28:30|DEBUG|mencuba input
2017-04-25 16:28:30|DEBUG |input ditemui
2017-04-25 16:28:30|DEBUG|sumber percubaan(1)
2017-04-25 16:28:30|DEBUG|sumber ditemui
2017-04-25 16:28:30| DEBUG|mencuba
2017-04-25 16:28:30|DEBUG|ditemui
25-04-2017 16:28:30|DEBUG|mendapatkan konfigurasi untuk :input:max_line_length
2017-04-25 16:28:30|DEBUG|mencuba
2017-04-25 16:28:30|DEBUG|
2017-04-25 16:28:30|DEBUG|mencuba input
2017-04-25 16:28:30|DEBUG|menjumpai input
2017-04-25 16:28:30|DEBUG|mencuba max_line_20 -04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk :input:transform
2017-04-25 16:28:30|DEBUG|mencuba
2017-04-25 16:28:30|DEBUG|ditemui
2017-04-25 16:28:30|DEBUG|mencuba input
2017-04-25 16:28:30|DEBUG|menjumpai input
2017-04-25 16:28:30|DEBUG|mencuba mengubah
2017 04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk :input:transform_config
2017-04-25 16:28:30|DEBUG|mencuba
2017-04-25 16:28:30|DEBUG2017|ditemui
-04-25 16:28:30|DEBUG|mencuba input
2017-04-25 16:28:30|DEBUG|menjumpai input
2017-04-25 16:28:30|DEBUG|mencuba transform_config
2017-04 -25 16:28:30|LOG|cuba menjalankan gpfdist -p 8000 -P 8001 -f "/home/gpadmin/extend/test2." -t 30 -V
2017-04-25 16:28:30|LOG|gpfdist berkata: 2017-04-25 16:28:30 11767 INFO Sebelum membuka soket mendengar - soket mendengar berikut tersedia:
2017-04- 25 16:28:30|DEBUG|gpfdist: [msg] libevent using: epoll
2017-04-25 16:28:30|LOG|gpfdist berkata: 2017-04-25 16:28:30 11767 INFO IPV6 soket [::]:8000
2017-04-25 16:28:30|DEBUG|gpfdist:
2017-04-25 16:28:30|LOG|gpfdist berkata: 2017-04-25 16:28:630 1 INFO Soket IPV4: 0.0.0.0:8000
2017-04-25 16:28:30|LOG|gpfdist berkata: 2017-04-25 16:28:30 11767 INFO Cuba buka soket mendengar:
2017-04-257 16:28:30|LOG|gpfdist berkata: 25-04-2017 16:28:30 11767 INFO soket IPV6: [::]:8000
2017-04-25 16:28:30|LOG|gpfdist berkata: 2017 -04-25 16:28:30 11767 WARN Alamat sudah digunakan (errno = 98), port: 8000
2017-04-25 16:28:30|LOG|gpfdist berkata: 2017-04-25 16:28: 30 11767 INFO Cuba buka soket mendengar:
2017-04-25 16:28:30|LOG|gpfdist berkata: 2017-04-25 16:28:30 11767 INFO Soket IPV4: 0.0.0.0.0:804 -25 16:28:30|LOG|gpfdist berkata: 2017-04-25 16:28:30 11767 WARN Alamat sudah digunakan (errno = 98), port: 8000
2017-04-25 16:28:30| LOG|gpfdist berkata:
2017-04-25 16:28:30|LOG|gpfdist berkata: 2017-04-25 16:28:30 11767 INFO Sebelum membuka soket mendengar - soket mendengar berikut tersedia:
2017-04 25 16:28:30|LOG|gpfdist berkata: 2017-04-25 16:28:30 11767 INFO IPV6 soket: [::]:8001
2017-04-25 16:28:30|LOG|gpfdist berkata: 2017-04-25 16:28:30 11767 INFO Soket IPV4: 0.0.0.0:8001
2017-04-25 16:28:30|LOG|gpfdist berkata: 2017-04-25 10:28:3 INFO17:3 untuk membuka soket mendengar:
2017-04-25 16:28:30|LOG|gpfdist berkata: 2017-04-25 16:28:30 11767 INFO soket IPV6: [::]:8001
2017-04-25 :28:30|LOG|gpfdist berkata: 2017-04-25 16:28:30 11767 INFO Membuka soket mendengar berjaya
2017-04-25 16:28:30|LOG|gpfdist berkata: 2017-04-25 16: 28:30 11767 INFO Cuba buka soket mendengar:
2017-04-25 16:28:30|LOG|gpfdist berkata: 2017-04-25 16:28:30 11767 INFO Soket IPV4: 0.0.0.0: 0.0.0.025-04-2017 16:28:30|LOG|gpfdist berkata: 2017-04-25 16:28:30 11767 WARN Alamat sudah digunakan (errno = 98), port: 8001
2017-04-25 16:28 :30|LOG|gpfdist berkata: Menyediakan HTTP pada port 8001, direktori /home/gpadmin/extend
2017-04-25 16:28:30|INFO|mulakan gpfdist -p 8000 -P 8001 -f "/home/gpadmin /extend/test2." -t 30 -V
2017-04-25 16:28:30|LOG|gpfdist sedang berjalan pada port 8001
2017-04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk :input:source:ssl
2017 -04-25 16:28:30|DEBUG|mencuba
2017-04-25 16:28:30|DEBUG|ditemui
2017-04-25 16:28:30|DEBUG|mencuba input
2017-04-25 16:28:30|DEBUG|input ditemui
2017-04-25 16:28:30|DEBUG|sumber percubaan
2017-04-25 16:28:30|DEBUG|sumber ditemui
2017-04-25 16: 28:30|DEBUG|mencuba ssl
2017-04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk :input:source(2)
2017-04-25 16:28:30|DEBUG|mencuba
2017 04-25 16:28:30|DEBUG|dijumpai
2017-04-25 16:28:30|DEBUG|mencuba input
2017-04-25 16:28:30|DEBUG|menjumpai input
2017-04-25 16:28:30|DEBUG|sumber percubaan(2)
2017-04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk :pramuat
2017-04-25 16:28:30|DEBUG|mencuba
2017- 04-25 16:28:30|DEBUG|ditemui
2017-04-25 16:28:30|DEBUG|mencuba pramuat
2017-04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk :output:mode
2017-04-25 16:28:30|DEBUG|mencuba
2017-04-25 16:28:30|DEBUG|ditemui
2017-04-25 16:28:30|DEBUG|mencuba output
4-2017 25 16:28:30|DEBUG|output ditemui
2017-04-25 16:28:30|DEBUG|mod percubaan
2017-04-25 16:28:30|DEBUG|mod ditemui
25-04-2017 16 :28:30|DEBUG|mendapatkan konfigurasi untuk :input:error_table
2017-04-25 16:28:30|DEBUG|mencuba
2017-04-25 16:28:30|DEBUG|ditemui
2017-04-2017 16:28:30|DEBUG|mencuba input
2017-04-25 16:28:30|DEBUG|menjumpai input
2017-04-25 16:28:30|DEBUG|mencuba error_table
2017-04-25 16: 28:30|DEBUG|menjumpai error_table
2017-04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk :input:log_errors
2017-04-25 16:28:30|DEBUG|mencuba
4-2017-0 16:28:30|DEBUG|ditemui
2017-04-25 16:28:30|DEBUG|mencuba input
2017-04-25 16:28:30|DEBUG|ditemui input
2017-04-25 16:28 :30|DEBUG|mencuba log_errors
2017-04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk :sql
2017-04-25 16:28:30|DEBUG|mencuba
2017-04-25 :30|DEBUG|ditemui
2017-04-25 16:28:30|DEBUG|mencuba sql
2017-04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk :input:format
2017-04-25 :28:30|DEBUG|mencuba
2017-04-25 16:28:30|DEBUG|ditemui
2017-04-25 16:28:30|DEBUG|mencuba input
2017-04-25 16:28:30 |DEBUG|input ditemui
2017-04-25 16:28:30|DEBUG|format percubaan
2017-04-25 16:28:30|DEBUG|format ditemui
2017-04-25 16:28:30|DEBUG |mendapatkan konfigurasi untuk :input:delimiter
2017-04-25 16:28:30|DEBUG|mencuba
2017-04-25 16:28:30|DEBUG|ditemui
2017-04-25 16:28:30| DEBUG|mencuba input
2017-04-25 16:28:30|DEBUG|menjumpai input
2017-04-25 16:28:30|DEBUG|mencuba pembatas
2017-04-25 16:28:30|DEBUG| ditemui pembatas
2017-04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk :input:delimiter
2017-04-25 16:28:30|DEBUG|mencuba
2017-04-25 16:28:30 DEBUG|ditemui
25-04-2017 16:28:30|DEBUG|mencuba input
2017-04-25 16:28:30|DEBUG|menjumpai input
2017-04-25 16:28:30|DEBUG|mencuba pembatas
2017 04-25 16:28:30|DEBUG|ditemui pembatas
2017-04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk :input:null_as
2017-04-25 16:28:30|DEBUG|mencuba
2017-04-25 16:28:30|DEBUG|ditemui
2017-04-25 16:28:30|DEBUG|mencuba input
2017-04-25 16:28:30|DEBUG|menjumpai input
42017-0 -25 16:28:30|DEBUG|mencuba null_as
2017-04-25 16:28:30|DEBUG|null False
2017-04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk :input:escape
2017-04-25 16:28:30|DEBUG|mencuba
2017-04-25 16:28:30|DEBUG|ditemui
2017-04-25 16:28:30|DEBUG|mencuba input
4-2017 25 16:28:30|DEBUG|menjumpai input
2017-04-25 16:28:30|DEBUG|mencuba melarikan diri
2017-04-25 16:28:30|DEBUG|mendapatkan konfigurasi untuk :input:quote
2017 -04-25 16:28:30|DEBUG|mencuba
2017-04-25 16:28:30|DEBUG|ditemui
2017-04-25 16:28:30|DEBUG|mencuba input
2017-04-25 16:28:30|DEBUG|input ditemui
2017-04-25 16:28:30|DEBUG|mencuba petikan
2017-04-25 16:28:30||A
2017-04-25 16:28: 30|LOG|membunuh gpfdist
2017-04-25 16:28:30|DEBUG|gpfdist: 2017-04-25 16:28:30 11767 WARN signal 15 diterima. gpfdist keluar
2017-04-25 16:28:30|DEBUG|gpfdist: 2017-04-25 16:28:30 11767 INFO -------------------- -------------------
2017-04-25 16:28:30|DEBUG|gpfdist: 2017-04-25 16:28:30 11767 STATUS INFO: jumlah sesi 0
2017-04-25 16:28:30|DEBUG|gpfdist: sesi: [
2017-04-25 16:28:30|DEBUG|gpfdist: ]
2017-04-25 16:28 :30|DEBUG|gpfdist: 2017-04-25 16:28:30 11767 INFO ------------------------------- --------
2017-04-25 16:28:30|INFO|baris Dimasukkan = 0
2017-04-25 16:28:30|INFO|baris Dikemas kini = 0
2017-04-25 16:28:30|INFO| ralat pemformatan = 0
2017-04-25 16:28:30|INFO| gagal
其中端口8000是gpfdist的端口.
求大神解释下,
A gpload control file processing error occurred. The configuration must contain gpload:input:quotefor csv formatted data
为什么不匹配,test2.中的分隔符就是'|' 呀!!!!
Dua perkara yang perlu diperhatikan:
1. Tidak perlu memulakan gpfdist secara manual akan dimulakan secara automatik apabila gpload dilaksanakan. Terdapat juga port 8000 yang dikonfigurasikan dalam yml, tetapi port 8001 akan muncul semasa pelaksanaan. selesai, gpfdist secara automatik akan membunuh)
2.yml tidak mempunyai tetapan petikan: - PETIKAN: ''''
Dua point di atas boleh menyelesaikan masalah di atas.