Skip to main content

CREATE SINK

Use the CREATE SINK command to create a sink. A sink is an external target where you can send data processed in RisingWave. You can create a sink from a table or source, or a materialized view.

If your goal is to create an append-only sink, you can use the emit-on-window-close policy when creating the materialized view that you want to sink data from. For details about the policy, see Emit on window close.

Syntax

CREATE SINK [ IF NOT EXISTS ] sink_name
[FROM sink_from | AS select_query]
WITH (
connector='connector_name',
connector_parameter = 'value', ...
)
[ FORMAT data_format ENCODE data_encode [ (
format_parameter = 'value'
) ] ];
note

The optional FORMAT data_format ENCODE data_encode syntax is only used for Kafka, Kinesis, and Pulsar sinks.

Supported sinks

Click a sink name to see the SQL syntax, options, and sample statement of sinking data from RisingWave to the sink.

See also

DROP SINK — Remove a sink.

SHOW CREATE SINK — Show the SQL statement used to create a sink.

note

Timestamptz values are stored in UTC.

When sinking downstream, the representation of timestamptz is configurable. By default, it is in the format 2023-11-11T18:30:09.453000Z.

Help us make this doc better!

Was this page helpful?

Happy React is loading...