Output Formats for Writing

s-Server's formatters write rows out of s-Server into commonly used data exchange formats, including CSV, XML, JSON, BSON, Apache Avro, and Optimized Row Columnar (ORC).

In s-Server, the destination for data writing and format for data are separate, meaning you can, for example, write JSON formatted data to the file system, a network socket, AMQP, Kafka, Amazon Kinesis, Snowflake, MongoDB, over HTTP, and to a WebSocket.

s-Server supports the following data formats:

You set the data format through the FORMATTER parameter of a foreign table or foreign stream. For example, the following AMQP foreign stream formats data as CSV.

CREATE OR REPLACE FOREIGN STREAM amqp_stream (
line VARCHAR(4096))
SERVER AMQPSERVER
OPTIONS (DESTINATION 'amq.topic',
CONNECTION_URL 'amqp://guest:guest@clientid/?brokerlist=''tcp://localhost:5672',
FORMATTER 'CSV'
);

To change formatting to XML, use FORMATTER 'XML', and so on.