Skip to content

Netezza – ERROR [08S02] Unexpected protocol character/message

Issue:
You may face below error message when you are trying to create external table in Netezza appliance.

ERROR [08S02] Unexpected protocol character/message

CAUSE:
This error may occure when you try to create a external table.

CREATE EXTERNAL TABLE ‘c:\testtest.csv’ USING (DELIMITER ‘,’ REMOTESOURCE ‘odbc’ FILLRECORD ‘true’ DATEDELIM
‘/’ DATESTYLE ‘YMD’ QUOTEDVALUE ‘yes’ TIMEDELIM ‘:’ TIMESTYLE ’12HOUR’)
as ……

You will also see something like below in postgres logs
26499] ERROR: found delim ‘,’ in a data field, specify escapeChar ‘\’ option in the external table definition

RESOLUTION:
Make sure to specify escapeChar ‘\’ option in the create external table syntax and rerun your query.

CREATE EXTERNAL TABLE ‘c:\testtest.csv’ USING (DELIMITER ‘,’ REMOTESOURCE ‘odbc’ FILLRECORD ‘true’ DATEDELIM
‘/’ DATESTYLE ‘YMD’ QUOTEDVALUE ‘yes’ TIMEDELIM ‘:’ TIMESTYLE ’12HOUR’ escapeChar ‘\’)
as ……