Skip to content


Sink represents the output (sourceName) of the following KSQL statements:

Naming Convention

The part of these statements to denote the output name of a sink to write results to is called sourceName in ANTLR definition file.

That'd be fairly confusing to use source to mean sink, but the reason to call it sourceName is that in the end a sink becomes a DataSource other statements can read from. So it really makes sense to call it this way (even risking some confusion).

This should clear up the confusion, shouldn't it?

Creating Instance

Sink takes the following to be created:

Sink is created using Sink.of utility.

Creating Sink Instance

Sink of(
  SourceName name,
  boolean createSink,
  boolean replaces,
  CreateSourceAsProperties properties)

of creates a Sink.


of simply "replaces" new keyword to instantiate a Sink object to make code more fluent.

Sink s = new Sink(...)
Sink s = Sink.of(...)

of is used when:

  • CreateAsSelect is requested for a Sink
  • InsertInto is requested to for a Sink