Skip to content

Instantly share code, notes, and snippets.

@weeksdev
Last active March 13, 2017 21:00
Show Gist options
  • Save weeksdev/a520fd1c0260875f75a0 to your computer and use it in GitHub Desktop.
Save weeksdev/a520fd1c0260875f75a0 to your computer and use it in GitHub Desktop.
Netezza Generate External Command
CREATE EXTERNAL TABLE 'path/to/flat/file.dat'
USING ( delim ',' datestyle 'YMD' datedelim '-' REMOTESOURCE 'ODBC' requireQuotes true quotedvalue 'yes' LOGDIR 'path/to/log/directory/' nullvalue '') AS
SELECT *
FROM MonkeyPants
INSERT INTO target_table SELECT * FROM EXTERNAL 'C:\FileName.txt'
using( delim '|' datestyle 'MDY' datedelim '/' REMOTESOURCE 'ODBC' MAXERRORS 50
LOGDIR 'C:\');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment