public class JDBCAppendTableSink extends Object implements org.apache.flink.table.sinks.AppendStreamTableSink<org.apache.flink.types.Row>, org.apache.flink.table.sinks.BatchTableSink<org.apache.flink.types.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<org.apache.flink.types.Row> |
configure(String[] fieldNames,
org.apache.flink.api.common.typeinfo.TypeInformation<?>[] fieldTypes) |
void |
emitDataSet(org.apache.flink.api.java.DataSet<org.apache.flink.types.Row> dataSet) |
void |
emitDataStream(org.apache.flink.streaming.api.datastream.DataStream<org.apache.flink.types.Row> dataStream) |
String[] |
getFieldNames() |
org.apache.flink.api.common.typeinfo.TypeInformation<?>[] |
getFieldTypes() |
org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> |
getOutputType() |
public static JDBCAppendTableSinkBuilder builder()
public void emitDataStream(org.apache.flink.streaming.api.datastream.DataStream<org.apache.flink.types.Row> dataStream)
emitDataStream in interface org.apache.flink.table.sinks.AppendStreamTableSink<org.apache.flink.types.Row>emitDataStream in interface org.apache.flink.table.sinks.StreamTableSink<org.apache.flink.types.Row>public void emitDataSet(org.apache.flink.api.java.DataSet<org.apache.flink.types.Row> dataSet)
emitDataSet in interface org.apache.flink.table.sinks.BatchTableSink<org.apache.flink.types.Row>public org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> getOutputType()
getOutputType in interface org.apache.flink.table.sinks.TableSink<org.apache.flink.types.Row>public String[] getFieldNames()
getFieldNames in interface org.apache.flink.table.sinks.TableSink<org.apache.flink.types.Row>public org.apache.flink.api.common.typeinfo.TypeInformation<?>[] getFieldTypes()
getFieldTypes in interface org.apache.flink.table.sinks.TableSink<org.apache.flink.types.Row>public org.apache.flink.table.sinks.TableSink<org.apache.flink.types.Row> configure(String[] fieldNames, org.apache.flink.api.common.typeinfo.TypeInformation<?>[] fieldTypes)
configure in interface org.apache.flink.table.sinks.TableSink<org.apache.flink.types.Row>Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.