public class JDBCAppendTableSink extends Object implements org.apache.flink.table.sinks.AppendStreamTableSink<Row>, org.apache.flink.table.sinks.BatchTableSink<Row>
The mechanisms of Flink guarantees delivering messages at-least-once to this sink (if
checkpointing is enabled). However, one common use case is to run idempotent queries
(e.g., REPLACE
or INSERT OVERWRITE
) to upsert into the database and
achieve exactly-once semantic.
Modifier and Type | Method and Description |
---|---|
static JDBCAppendTableSinkBuilder |
builder() |
org.apache.flink.table.sinks.TableSink<Row> |
configure(String[] fieldNames,
TypeInformation<?>[] fieldTypes) |
void |
emitDataSet(DataSet<Row> dataSet) |
void |
emitDataStream(DataStream<Row> dataStream) |
String[] |
getFieldNames() |
TypeInformation<?>[] |
getFieldTypes() |
TypeInformation<Row> |
getOutputType() |
public static JDBCAppendTableSinkBuilder builder()
public void emitDataStream(DataStream<Row> dataStream)
emitDataStream
in interface org.apache.flink.table.sinks.AppendStreamTableSink<Row>
public void emitDataSet(DataSet<Row> dataSet)
emitDataSet
in interface org.apache.flink.table.sinks.BatchTableSink<Row>
public TypeInformation<Row> getOutputType()
getOutputType
in interface org.apache.flink.table.sinks.TableSink<Row>
public String[] getFieldNames()
getFieldNames
in interface org.apache.flink.table.sinks.TableSink<Row>
public TypeInformation<?>[] getFieldTypes()
getFieldTypes
in interface org.apache.flink.table.sinks.TableSink<Row>
public org.apache.flink.table.sinks.TableSink<Row> configure(String[] fieldNames, TypeInformation<?>[] fieldTypes)
configure
in interface org.apache.flink.table.sinks.TableSink<Row>
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.