Skip to main content
GuideServerConfigure and deploy Tabsdata servers on your machine.TutorialsConfigure data integration workflows within a running Tabsdata server.Advanced TutorialsBuild end-to-end workflows between two specific systems.API ReferenceCLI ReferenceRelease Notes
Version: 2.0.2

Snowflake

The Snowflake connector lets Tabsdata write tables into Snowflake. Snowflake is destination-only: there is no publisher-side connector for reading from Snowflake.

The SnowflakeDest connector can be used by a subscriber function to write data from a Tabsdata table into Snowflake. See the full subscriber walkthrough

Connection

Snowflake subscribers use SnowflakeDestConn to define the account, credentials, and default namespace used by the subscriber.

conn-snowflake.yaml
kind: connectionDef
apiVersion: '1.0'
type: tabsdatak.conn.snowflake:SnowflakeDestConn
spec:
account: 'ABCDEFG-XY12345'
credentials:
kind: userPasswordCredentials
apiVersion: '1.0'
type: tabsdatak.conn.common.types:UserPassword
spec:
user: 'secret:tabsdata_svc'
password: 'secret:CorrectHorseBatteryStaple'
  • required
  • required
  • optional
  • optional
  • optional
  • optional
  • optional
  • optional

Connection Config Parameters

account

The Snowflake account identifier or locator, such as ABCDEFG-XY12345.

credentials

The Snowflake credentials used to authenticate. UserPassword requires a user and password; a personal access token can be passed as the password.

role

An optional role the connection runs USE for before writing.

database

The default database. Required when schema is set.

schema

The default schema. Requires database to be set.

warehouse

An optional warehouse the connection runs USE WAREHOUSE for. USE WAREHOUSE is only issued when this is set.

stage

An optional permanent stage used for PUT and COPY INTO. When unset, the plugin creates a session-scoped temporary stage instead.

conn_cfg

Optional connector-config overrides, forwarded to snowflake-connector-python.

Subscriber

Configure SnowflakeDest as the destination of a subscriber function to define which tables Tabsdata writes in Snowflake.

write_orders.py
from tabsdatak.api import subscriber
from tabsdatak.conn.snowflake import SnowflakeDest

@subscriber(
destination=SnowflakeDest(
tables=[
"orders",
],
),
input_tables=["orders"],
)
def write_orders(orders):
return orders
  • required
  • optional
  • optional

Function Config Parameters

tables

Defines the destination tables the subscriber writes to in Snowflake.

Each element in tables represents one destination slot and maps positionally to a value returned by the subscriber function. Each name is a 1-, 2-, or 3-part name (table, schema.table, or database.schema.table); double-quote a part for a case-sensitive or special-character name.

if_table_exists

Controls what happens when the destination table already exists. "append" (the default) adds rows. "replace" issues TRUNCATE before COPY INTO, so the existing schema is preserved.

dest_cfg

Sets additional destination configuration. The only supported key is snowflake.logging_level.