Comparison between the classic SDK and the high-performance SDK¶
Here is a summary of what’s changed from the classic SDK to the high-performance SDK:
OpenClient
: you need to specify theDB
,SCHEMA
, andPIPE
for the new version. Previously you only needed to specifyNAME
.OpenChannel
:You only need to specify the channel name for the new version. Previously, you needed to specify the
DB
,SCHEMA
,TABLE
, andERROR_OPTION
.In the new version, an
OpenChannelResult
is returned to you containing both the channel entity as well as thechannelStatus
when the channel is opened. You will not need to fetch the last committed token through another RPC call into Snowflake compared with the legacy version.
InsertRows
is renamed toAppendRows
.CloseChannel
: previously Snowpipe Streaming did an async call to wait for the token to be fully committed and return a future object for the user to fetch the result. This is currently not supported in the new version.GetLatestCommittedOffsetTokens
: this is a batch API to get the latest offset tokens of the channels opened by this client and does not allow partial failures in the classic SDK. In the new SDK, it is allowed to fetch the latest offset tokens that are not opened by the client and this API also allows partial failures.isValid
is removed in the new version.
The following tables show the API differences between the classic SDK and the high-performance SDK:
SnowflakeStreamingIngestClientFactory and SnowflakeStreamingIngestClientFactory.Builder
Classic |
High-performance |
Notes |
---|---|---|
|
|
Note that |
SnowflakeStreamingIngestClient
Classic
High-performance
Notes
String getName()
String getClientName()
API name change only; the same information is returned.
N/A
String getDBName()
New API.
N/A
String getPipeName()
New API.
N/A
String getSchemaName()
New API.
SnowflakeStreamingIngestChannel
openChannel(OpenChannelRequest request)
OpenChannelResult
openChannel(String channelName, String offsetToken)
Different request args and return values.
Map<String,String> getLatestCommittedOffsetTokens
(List<SnowflakeStreamingIngestChannel> channels)
Map<String, String> getLatestCommittedOffsetTokens
(List<String> channelNames)
Different request args. It now allows to fetch the channels status that opened by other clients and are potentially not belonged to the client.
N/A
ChannelStatusBatch getChannelStatuses(List<String> channelNames)
New API.
Void dropChannel(DropChannelRequest request)
Void dropChannel(String channelName)
Different request argument.
Void setRefreshToken(String refreshToken)
N/A
Only required for OAuth.
SnowflakeStreamingIngestChannel
Classic
High-performance
Notes
InsertValidationResponse insertRow(Map<String, Object> row, String offsetToken)
AppendResult appendRow(Map<String, Object> row, String offsetToken)
API name changed. Response type changed because there is no more validation on the client.
InsertValidationResponse insertRow(Iterable<Map<String, Object>> row, String startOffsetToken, String endOffsetToken)
AppendResult appendRows(Iterable<Map<String, Object>> row, String startOffsetToken, String endOffsetToken)
Response type changed because there is no more validation on the client.
InsertValidationResponse insertRow(Iterable<Map<String, Object>> row, String offsetToken)
N/A
Removed.
String getTableName()
N/A
Removed.
String getFullyQualifiedTableName()
N/A
Removed.
N/A
String getPipeName()
New API.
N/A
String getFullyQualifiedPipeName()
New API.
String getName()
String getChannelName()
API name change.
String getFullyQualifiedName()
String getFullyQualifiedChannelName()
API name change.
Map<String, ColumnProperties> getTableSchema()
N/A
Removed.
N/A
ChannelStatus getChannelStatus()
New API.
CompletableFuture<Void> close()
Void close()
The return type is changed, but the behavior is the same.
CompletableFuture<Void> close(boolean drop)
Void drop()
API name is changed, but the behavior is the same.
Boolean isValid()
N/A
Removed.