snowflake::ingest::streaming Namespace Reference
Snowpipe Streaming C++ API. More...
Classes | |
| class | StreamingIngestChannel |
| Snowflake Streaming Ingest Channel, which is used to ingest data into Snowflake using the Snowflake Ingest SDK. More... | |
| struct | ChannelStatus |
| Read-only snapshot of a channel's status. More... | |
| struct | ClientOptions |
| Configuration for constructing a client. More... | |
| struct | TableClientOptions |
| Configuration for constructing a table-mode client. More... | |
| class | StreamingIngestClient |
| A class that is the starting point for using the Streaming Ingest client APIs, a single client maps to exactly one account/database/schema/pipe in Snowflake; however, multiple clients can point to the same account/database/schema/pipe. More... | |
| class | ErrorDetail |
The payload handed to an elastic-channel error handler (registered via StreamingIngestElasticChannel::SetErrorHandler()) when appends fail asynchronously. More... | |
| class | SuccessDetail |
The payload handed to an elastic-channel success handler (registered via StreamingIngestElasticChannel::SetSuccessHandler()) when appends are acknowledged by Snowflake. More... | |
| class | StreamingIngestElasticChannel |
| Elastic channel for Snowflake Streaming Ingest. More... | |
| class | StreamingIngestError |
Structured error type returned by all SDK operations via Result<T>. More... | |
Typedefs | |
| using | AppendToken = std::any |
| Caller-supplied opaque append token, delivered to a registered handler when the append is acknowledged or fails. | |
| using | ErrorHandler = std::function<void(const ErrorDetail&)> |
Handler registered via StreamingIngestElasticChannel::SetErrorHandler(). | |
| using | SuccessHandler = std::function<void(const SuccessDetail&)> |
Handler registered via StreamingIngestElasticChannel::SetSuccessHandler(). | |
| template<typename T> | |
| using | Result = tl::expected<T, StreamingIngestError> |
Alias for tl::expected<T, StreamingIngestError>. | |
Enumerations | |
| enum class | ErrorCode { kConfigError, kInvalidRequest, kInvalidArgument, kSfApiUserError, kNotImplemented, kHttpClientNonRetryableError, kChannelAlreadyExists, kElasticChannelReservedName, kCannotDropElasticChannel, kAuthTokenError, kSfApiAuthError, kChannelNotFound, kSfApiNotFoundError, kChannelWaitForFlushTimeout, kClientWaitForFlushTimeout, kWaitForCommitTimeout, kClosedChannelError, kClosedElasticChannelError, kClosedClientError, kChannelClosedByUser, kInvalidChannelError, kInvalidClientError, kInputChannelClosed, kOutputChannelClosed, kElasticChannelAlreadyCached, kBinaryInputFormatChanged, kSfApiPipeFailedOverError, kReceiverSaturated, kMemoryThresholdExceeded, kMemoryThresholdExceededInContainer, kFatal, kNonFatal, kMutexLockFailed, kSfApiUnexpectedBehaviorError, kSfApiInternalServerError, kFileUploadError, kHttpRetriesExhaustedError, kCloseAllChannelsFailedError, kTokenCheckerError, kHttpRetryableClientError, kUnknown } |
Error codes returned by SDK operations: the IngestError variants of the Rust core, plus certain C++-only client-side errors. | |
Functions | |
| std:: | ErrorCodeToString (ErrorCode code) noexcept |
Returns the PascalCase name of code, without the leading k (e.g. "ChannelNotFound" for kChannelNotFound). | |
| ErrorCode | ErrorCodeFromString (std::string_view s) noexcept |
Parses a PascalCase error code name into the enum (e.g. "ChannelNotFound" to kChannelNotFound). | |
| std:: | operator<< (std::ostream &os, const StreamingIngestError &e) |
Writes StreamingIngestError::ToString() to the stream. | |
Detailed Description
Snowpipe Streaming C++ API.
Typedef Documentation
AppendToken¶
Caller-supplied opaque append token, delivered to a registered handler when the append is acknowledged or fails.
The SDK destroys its copy before the append's future completes.
Result¶
Alias for tl::expected<T, StreamingIngestError>.
All API methods that can fail return Result<T>. Check it with has_value() or operator bool before use; there is no implicit conversion to T. On success, access the value with operator*, operator->, or value(). On failure, call error() to retrieve the error.
Function Documentation
ErrorCodeFromString¶
|
ErrorCode ErrorCodeFromString(std::string_view s)
|
noexcept |
Parses a PascalCase error code name into the enum (e.g. "ChannelNotFound" to kChannelNotFound).
- Parameters
-
s the PascalCase name to parse
- Returns
- the matching
ErrorCode, orkUnknownifsis not a known name
ErrorCodeToString¶
|
std::string_view ErrorCodeToString(ErrorCode code)
|
noexcept |
Returns the PascalCase name of code, without the leading k (e.g. "ChannelNotFound" for kChannelNotFound).
- Parameters
-
code the error code to convert
- Returns
- the PascalCase name of
code, or"Unknown"if it is not in the enum
operator<<¶
Writes StreamingIngestError::ToString() to the stream.
- Parameters
-
os the output stream to write to e the error to write
- Returns
osprovided