$ vi gpload_foo.yaml VERSION: 1.0.0.1 GPLOAD: INPUT: - SOURCE: FILE: - /home/gpadmin/foo.csv - FORMAT: csv - HEADER: true - LOG_ERRORS: true - ERROR_LIMIT: 20 OUTPUT: - TABLE: public.foo - MODE: insert PRELOAD: - TRUNCATE: true - REUSE_TABLES: true
$ psql -c "CREATE TABLE public.foo (a int, b text) DISTRIBUTED BY (a);" $ psql -c "insert into public.foo values (1,'b');" $ psql -c "select count(*) from public.foo;" count ------- 1 (1 row)
8,"a" 9,"a" 10,"a" "a","a" "a","a" "a","a" "a","a"
$ gpload -f gpload_foo.yaml $ psql -c "select count(*) from public.foo;" count ------- 0
Greenplum 6.23
The permanent fix is available in 6.25.2 and above.
Current workaround is to modify the the file $GPHOME/bin/gpload.py.
There are two lines of this:
if not self.options.no_auto_trans and not method=='insert':
Modified both to:
if not self.options.no_auto_trans:
Then check that it works.
Note: This is just a temporary workaround, backup the file before editing.