loading files with dates into netezza -
i'm trying import text file netezza. simplifie example use file 1 column.
file
01/04/2011 01/01/2099 01/01/2011
i have table
create table test_data (f date)
i try load data
insert test_data select * external 'c:\\temp\\dt.txt' using ( datestyle 'dmy' datedelim '/' maxerrors 100000000000 y2base 2000 encoding 'internal' remotesource 'odbc' delimiter '\t' crinstring true truncstring true ctrlchars true ignorezero true -- escapechar '\' )
and have no data in table after insert. have ideas reason?
i know i'm answering stale question, google puts near top of "netezza datestyle" should have correct answer on it.
your data file , test table ddl both fine. insert statement has lot of parameters don't need. minimal syntax is:
insert test_data select * external 'c:\\temp\\dt.txt' using ( datestyle 'dmy' datedelim '/' remotesource odbc -- note had quoted string. either should work logdir 'c:\\temp' -- pointed out, give log files troubleshoot );
i tested syntax example file, , data loads , sorts correctly (e.g. knows 1/4/2011 april 1 not jan 4) valid datestyle values ‘ymd’, ‘mdy’, ‘dmy’, ‘mondy’. default 'ymd'
your high maxerrors (without logdir) means records silently discarded on error. unless need account bad data records, set maxerrors low possible (e.g. 1, account optional header row)
Comments
Post a Comment