Connecting to Snowflake Data Share
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.