Sharing Data with Chord via Snowflake
Introduction
This guide provides step-by-step instructions for sharing data with Chord via Snowflake.
Snowflake's secure data sharing capabilities lets you share specific database objects in your Snowflake account with other Snowflake accounts. There are two primary mechanisms by which Snowflake enables sharing data across accounts.
- A direct share. Use a direct share to share data with one or more accounts in the same Snowflake region. You do not need to copy or move data shared with a direct share.
- A private listing. Use a private listing to share data directly with other Snowflake accounts in any Snowflake region. A private listing is a managed service that will automatically handle cross-region and cross-cloud replication. See auto-fulfillment costs for pricing details.
Creating a direct share
A direct share is appropriate when your Snowflake account resides in the same cloud / region as Chord's Snowflake account (AWS - US East Ohio). If your Snowflake account resides in a different cloud / region, please refer to "Creating a private listing" below.
You must use the ACCOUNTADMIN role or a role that has been granted the CREATE SHARE global privilege to create shares.
To create a direct share in the Snowflake UI:
- Sign in to Snowsight.
- In the navigation menu, select Data sharing » External sharing.
- Select the Shared by your account tab.
- Select Share » Create a Direct Share.
- In the Share Data dialog, select + Select Data and then:
- Select a source database.
- Select a target object or objects from the source database.
- Optionally, update the Secure Share Identifier created for your share.
- Optionally, enter a Description.
- In the remaining text box, enter an account locator. Chord's account locator is: CZA77372.RK46674. Entering a partial account locator lists all accounts that match the entered text. Repeat as required to add additional accounts. You can only add accounts within the same region to the share.
- Select Create Share.
Creating a private listing
A private listing is used to share data directly with other Snowflake accounts in any Snowflake region. A private listing is a managed service that will automatically handle cross-region and cross-cloud replication. See auto-fulfillment costs for pricing details.
Accept the terms and conditions
In order to create a listing, you first need to accept the terms and conditions via Snowflake Provider and Consumer Terms. We also recommend that you review the Provider Policies.
In order to provide a free private listing, you do not need to set up a Provider Profile.
Enable auto-fulfillment
When you share a private listing with Snowflake accounts in another region, you must enable auto-fulfillment. Auto-fulfillment is a Snowflake-managed service that handles the automatic replication of data across clouds / regions.
In order to enable auto-fulfillment, you need to assume the ORGADMIN and ACCOUNTADMIN roles.
To enable auto-fulfillment open a Snowflake worksheet and run the following:
USE ROLE ORGADMIN;
SELECT SYSTEM$ENABLE_GLOBAL_DATA_SHARING_FOR_ACCOUNT('<account_name>');
USE ROLE ACCOUNTADMIN;
GRANT MANAGE LISTING AUTO FULFILLMENT ON ACCOUNT TO ROLE ACCOUNTADMIN;
SELECT SYSTEM$IS_GLOBAL_DATA_SHARING_ENABLED_FOR_ACCOUNT('<account_name>');
If you do not know your account name, you can use the following SQL:
SELECT CURRENT_ACCOUNT_NAME();
Create a private listing
- Sign in to Snowsight.
- In the navigation menu, select Marketplace » Provider Studio.
- Select Create Listing » Specified Consumers.
- In the Edit listing title dialog, enter a name for your listing.
- Select the Add data product button, then click + Select to select the objects to attach to the listing.
- If you select one or more database objects, Snowflake creates a secure share with those objects. You can change the name of the secure share.
- If you select an existing secure share, the name of that share appears.
- In the Access type dropdown, select Free.
- In the Who can access section, add the organization and account names for the consumers that you want to share the listing with. Chord's account locator is: CZA77372.RK46674
- If you add a consumer account in a region that isn’t your local region, Snowflake enables auto-fulfillment to replicate data to the remote region after a consumer gets your listing. Complete the following additional steps:
- In the Auto-fulfillment section, enter a value and select an interval to specify how often to replicate your data product from your region to the remote region.
- If you don’t have a default warehouse set, select a warehouse to use for auto-fulfillment.
- Enter a description for your listing.
- In the Legal Terms section, select "Terms of service will be provided offline". If you don’t see any legal terms, you must first accept the Snowflake Provider and Consumer Terms.
- (Optional) In the Attributes section, add custom attributes to your listing.
- (Optional) Click in the Data dictionary section to add featured objects from the listing’s data dictionary.
- (Optional) Click in the Business needs section to add tags that describe the business needs that your data product addresses.
- (Optional) Click in the Quick Start Examples section to add sample SQL queries or a notebook that demonstrate how to use the data product.
- Select Publish to publish the listing to the selected consumers. Snowflake saves your listing if you don’t publish it immediately.