Skip to main content

syntax

Parameters

A table without a primary key can only accept the append-only sink.
You can use ALTER TABLE ... ADD COLUMN to add columns to a table that has sinks.

Enable sink decoupling

Added in v2.5.0. It is currently in technical preview stage.
By default, sink decoupling is disabled for sinks created with CREATE SINK INTO. To enable it, set sink_decouple = true before creating the sink.

Examples

You can union data from two different Kafka topics.
If you don’t want one of the topics, you can drop it.

Troubleshooting

  1. CREATE SINK ... INTO aligns rows to be inserted based on column order, not column names. If you see data correctness issues, verify that the column order in the SELECT list matches the target table.
  2. The sink target table may have a different primary key than the upstream table. If primary keys overlap downstream, rows can be overwritten. This can make your downstream table have fewer rows than your upstream table.

See also

CREATE SINK

Create a sink into an external target

DROP SINK

Remove a sink

SHOW CREATE SINK

Show the SQL statement used to create a sink