Class SnowflakeSinkServiceImpl
java.lang.Object
io.deltastream.flink.connector.snowflake.sink.internal.SnowflakeSinkServiceImpl
- All Implemented Interfaces:
SnowflakeSinkService,AutoCloseable
This class is the service implementation for managing ingest client and channel for writing
Snowflake rows to a db.schema.table in the external service.
-
Constructor Summary
ConstructorsConstructorDescriptionSnowflakeSinkServiceImpl(String appId, int taskId, Properties connectionConfig, SnowflakeWriterConfig writerConfig, SnowflakeChannelConfig channelConfig, org.apache.flink.metrics.groups.SinkWriterMetricGroup metricGroup) Construct a new sink service to provide APIs to the Snowflake service. -
Method Summary
-
Constructor Details
-
SnowflakeSinkServiceImpl
public SnowflakeSinkServiceImpl(String appId, int taskId, Properties connectionConfig, SnowflakeWriterConfig writerConfig, SnowflakeChannelConfig channelConfig, org.apache.flink.metrics.groups.SinkWriterMetricGroup metricGroup) Construct a new sink service to provide APIs to the Snowflake service.- Parameters:
appId-StringUID for Flink jobtaskId-IntegerFlink subtask IDconnectionConfig-PropertiesSnowflake connection settingswriterConfig-SnowflakeWriterConfigchannelConfig-SnowflakeChannelConfigmetricGroup-SinkWriterMetricGroup
-
-
Method Details
-
getWriterConfig
-
getChannelConfig
-
getClient
public net.snowflake.ingest.streaming.SnowflakeStreamingIngestClient getClient() -
getChannelName
-
getChannel
public net.snowflake.ingest.streaming.SnowflakeStreamingIngestChannel getChannel() -
insert
Description copied from interface:SnowflakeSinkServiceInsert aMapserialized record to be written.- Specified by:
insertin interfaceSnowflakeSinkService- Parameters:
row-Mapserialized Snowflake row to insert- Throws:
IOException
-
flush
Description copied from interface:SnowflakeSinkServiceFlush internal data, if applicable.- Specified by:
flushin interfaceSnowflakeSinkService- Throws:
IOException- if data flush failed to write to backend
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
getLatestCommittedOffsetFromSnowflakeIngestChannel
protected long getLatestCommittedOffsetFromSnowflakeIngestChannel()
-