The 'None' parser lets you read incoming data as a single column of data without the data being parsed. It simply chops the source data into one or more rows. To use it, set PARSER to NONE and create a foreign stream with a single column (with any legal column name). The single column's type must be either VARBINARY or VARCHAR.
Example
CREATE OR REPLACE FOREIGN STREAM none_parser
( PAYLOAD VARCHAR(100000) --single column to be read
)
SERVER "FileReaderServer"
OPTIONS
( DIRECTORY 'unitsql/ecda'
, filename_pattern '(animals|plants)\.csv'
, PARSER 'NONE'
, character_encoding 'UTF-8'
);
Option Name | Description |
---|---|
PARSER | Must be set to NONE to use the None parser. |
CHARACTER_ENCODING | Only applies with VARCHAR. Defaults to UTF-8. See https://docs.oracle.com/javase/8/docs/api/java/nio/charset/StandardCharsets.html |
ROW_SEPARATOR | If ROW_SEPARATOR is specified, it should either be a string of HEX digit pairs when going to VARBINARY or a string that encodes properly in the character encoding being used. If ROW_SEPARATOR is not specified (or is empty) then each row will contain the entire content of one file or one message. |