Connecting to Snowflake Data Share
10 min
this guide explains how to access the altrata data feed through a snowflake private listing, create a shared database, and configure optional change tracking and automation workflows prerequisites your account representative will need your snowflake account identifier in order to share the altrata private listing with your account to find your account identifier, log into snowsight, click your username in the bottom left corner, and select view account details copy the value shown as account identifier it follows the format organization name account name you can also retrieve it by running the following in a snowflake worksheet select current organization name(), current account name(); step 1 access the private listing sign in to snowflake navigate to data marketplace → private sharing select the altrata shared listing click get data step 2 create a database from the share when prompted enter a database name example shared altrata datafeed assign the appropriate snowflake role click create step 3 grant internal permissions grant access to internal users or roles within your snowflake environment example grant imported privileges on database shared altrata datafeed to role analyst role; step 4 explore the shared data connect to the shared database and review available tables use database shared altrata datafeed; show tables; select from public person limit 10; step 5 create a stream for incremental changes snowflake streams enable change data capture (cdc) by tracking inserts, updates, and deletes on shared tables example create or replace stream person stream on table shared altrata datafeed public person; step 6 query incremental changes retrieve incremental changes captured by the stream select from person stream; step 7 process changes using merge the following example demonstrates how to merge incremental updates into a target table merge into person dailychanges t using person stream s on t person id = s person id when matched then update set t value = s value when not matched then insert (person id, value) values (s person id, s value); step 8 automate processing with a snowflake task (optional) you can automate stream processing using a scheduled snowflake task example create or replace task process stream warehouse = my wh schedule = '5 minute' as merge into person dailychanges t using person stream s on t person id = s person id when matched then update set t value = s value when not matched then insert (person id, value) values (s person id, s value); enable the task alter task process stream resume; additional notes ensure the assigned snowflake role has sufficient privileges to create streams and tasks streams only capture changes that occur after the stream is created tasks require an active snowflake warehouse to execute scheduled operations replace example object names with naming conventions appropriate for your environment
