Skip to content
Last updated

Access Peach Data w/ Snowflake Direct Share

What are Snowflake Direct Shares?

Snowflake Direct Share is the best option if you already have your own Snowflake account and want Peach data delivered directly into that environment. Instead of Peach creating a reader account on your behalf, we share the relevant database to your Snowflake account, and your team imports that share into a database inside your own account.

Some key points to note about Snowflake Direct Share:

  • You must already have your own Snowflake account. Direct shares are for sharing from one Snowflake account (Peach's) to another Snowflake account (yours).
  • The share is delivered directly into your Snowflake account. Your team creates a database from the share inside your own environment.
  • Your team manages users, roles, and compute on your side. You import the share, grant access to the right roles, and query it using your own Snowflake setup.
  • Compute usage runs on your own Snowflake warehouse. Querying data in Snowflake requires a virtual warehouse, so usage is tied to the warehouse you use in your account.
  • Direct share can support incremental patterns. Snowflake allows consumers to create streams on shared tables or secure views based on ingestion time metadata on the shared datasets.

Is Direct Share the Right Option?

Use a Snowflake Direct Share if:

  • You already have your own Snowflake account.
  • You want your Peach data to live inside your existing Snowflake environment.
  • You want to manage your own users, roles, and warehouses.
  • You want to use your existing ingestion tooling against your own Snowflake account.

Use a Snowflake Reader Account instead if:

  • You don't have a Snowflake account. Snowflake provides reader accounts specifically for consumers without their own account.
  • You want Peach to manage the Snowflake environment for you.
  • You want the fastest path to access without managing the import and privilege setup inside your own Snowflake account.

Note: For details on the Reader Account option, see Access Peach Data w/ Snowflake Reader Accounts.

How to Get Started

Peach will create the Snowflake Share and authorize your Snowflake account. Your team will import that share and configure access within your own Snowflake environment. Snowflake's consumer workflow for direct shares requires the consumer to create a database from the share before querying it.

  1. Send us your setup details.

    • A primary business contact name and email address
    • A primary technical contact name and email address
    • Your Snowflake account identifier (e.g. orgname-accountname).
    • Your ingestion tool or platform (optional)
  2. Confirm your Snowflake region and cloud provider. Standard Snowflake Direct Share is the simplest option when your Snowflake account is in the same region as Peach (GCP us-central1). If your account is in a different region or cloud, Peach will still be able to support sharing, but this requires additional cross-region/cross-cloud setup on our side.

  3. Create a database from the share once we notify you it is available. After Peach adds your account to the share, use ACCOUNTADMIN or another role with the required privileges to import it. Snowflake requires CREATE DATABASE and IMPORT SHARE privileges to create a database from a share.

    CREATE DATABASE PEACH_SHARED_DB FROM SHARE
    <peach_provider_account>.<share_name>;
  4. Grant access to the role used by your ingestion tool. By default, only the role that creates the imported database can access it. If you use a separate ingestion role, grant that role access to the imported database.

    GRANT IMPORTED PRIVILEGES ON DATABASE PEACH_SHARED_DB TO ROLE INGESTION_ROLE;
  5. Configure your ingestion tool using your own Snowflake connection settings. Your tool should connect to your Snowflake account using your account identifier, user, password or token, warehouse, and the imported database created from the share. Snowflake's connector and client configuration expects the account identifier plus optional warehouse, database, schema, and role settings.

  6. Validate that ingestion is working (see "Authentication Validation and Ingestion Test" section). Once you are connected, confirm that your ingestion tool can:

    • Reach your Snowflake account
    • See the imported Peach database
    • Run a test query
    • Pull the shared tables
  7. Send us any follow-up support requests. If you need changes to the shared dataset itself, let Peach know. If you need changes to users, roles, warehouses, or tooling configuration inside your Snowflake account, those are typically managed by your team because the direct share lives in your account.

Authentication Validation and Ingestion Test

Use the sample below to confirm that your Snowflake user can connect to your own Snowflake account and read a small sample from the imported Peach database. This is a simple smoke test to validate connectivity and read access before you configure your full ingestion workflow. Snowflake's Python connector supports standard connection parameters such as account, user, password, warehouse, database, and schema.

pip install snowflake-connector-python
import snowflake.connector

conn = snowflake.connector.connect(
    account="org-account",                # account identifier, not full URL
    user="client_ingestion_user",
    password="your_password_or_pat",       # PAT can be used here
    warehouse="YOUR_WAREHOUSE",
    database="PEACH_SHARED_DB",
    schema="PUBLIC",
)

cur = conn.cursor()
cur.execute("SELECT 1")
print("Connection test:", cur.fetchone()[0])

cur.execute("SELECT * FROM TRANSACTIONS LIMIT 10")
rows = cur.fetchall()
print(f"Read {len(rows)} rows successfully")

cur.close()
conn.close()

Questions

Contact support@peachfinance.com