Sink¶
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:
- Source Name
-
createSink
flag -
replaces
flag - CreateSourceAsProperties
Sink
is created using Sink.of utility.
Creating Sink Instance¶
Sink of(
SourceName name,
boolean createSink,
boolean replaces,
CreateSourceAsProperties properties)
of
creates a Sink.
Note
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: