Skip to main content
Pass snowflakeRelation("https://account.snowflakecomputing.com", login) as provider in the SQL mount example. Mount once per source relation. Rows and positions use the SQL mount’s label. Seal this JSON with bijection secret set. Use a programmatic access token for a role with read access to the selected table and usage on the named warehouse, database and schema. Use the actual case of quoted SQL identifiers.
Declare one to eight VARCHAR or scale-zero numeric key columns. Use the bigint kind for values that fit a signed 64-bit integer. Maintain a unique, non-null tuple at the source. Paging compares the full tuple with text in UTF-8 byte order. Record keys are JSON arrays of strings up to 512 encoded bytes. Each SQL API statement reads one snapshot and must return one result partition. The connector binds the key continuation, requests a 20-second statement timeout, and accepts up to 32 rows per published page, 24 KiB of JSON per row and 48 KiB of encoded records. Statements and follow-up reads use the same reviewed account origin. Later traversals refresh observed keys and keep keys that disappear. Change the configured incarnation when replacing or restoring the relation, and authorize a reset at the health revision and gap instant.

Stream changes

Bind snowflakeStream("https://account.snowflakecomputing.com", login) to a fresh mount. Pass the mount’s data label as the final argument for protected records. In the sealed connection JSON, use the same table path, columns and incarnation as above. Use a string "key": "ID" for a single signed 64-bit key and set settings to:
Create a dedicated standard stream on the base table in the same database and schema. Disable initial rows and do not move or recreate the stream until the mount has published its first cursor. Give the token role SELECT on the stream and underlying table and USAGE on the database, schema and warehouse. Maintain Time Travel and change tracking for the expected polling lag. The first window starts at the provider’s stream offset. Bijection reads CHANGES with an explicit end marker and retains that marker in millisecond precision. Subsequent windows start at the retained marker. This read-only mode issues no DML and leaves the Snowflake stream offset alone. A fresh mount starts empty. Each complete window publishes one result per affected signed 64-bit key, taking the row image or deletion from the table version at the window end. Updates to the key can remove the old key and add the new one. The standard stream’s net change semantics can cancel intermediate writes and combine multiple source commits. The driver tries windows up to 60 seconds wide. It can narrow a dense window before publishing, and requests a new page for the remaining range. A window must fit 32 affected keys and the encoded result budget. Exhausting the bounded attempts leaves the cursor at its preceding position. On Time Travel loss or changed table identity, health records a continuity gap. Install a fresh mount and provision a new stream offset to resume. The connector does not infer a retention floor from the configured retention period. Snowflake streams, Snowflake CHANGES.

Write a declared relation

Follow the parameterized SQL write guide for the writer binding, composite and text keys, declared projection and provider affected-row evidence.