# Snowflake

> **This guide is for Snowflake.** See also: [BigQuery](https://docs.rox.com/development/engineering/docs/rox-enterprise-integrations/data-warehouse-integration/bigquery) | [Databricks](https://docs.rox.com/development/engineering/docs/rox-enterprise-integrations/data-warehouse-integration/databricks)

#### Introduction

The **ROX Data Warehouse Integration** enables customers to share live data directly from their Snowflake data warehouse to ROX. Using Snowflake's native sharing capabilities, this integration provides real-time access to your data without copying, moving, or duplicating it—you retain full control while ROX gains secure, governed access.

This guide covers two methods for sharing data with ROX:

* **Direct Secure Share** — For customers on the same Snowflake region as ROX
* **Private Listing with Auto-Fulfillment** — For customers on different clouds or regions

***

#### Key Benefits

| Benefit                    | Description                                                    |
| -------------------------- | -------------------------------------------------------------- |
| **Full Control**           | Data stays in your account. You can revoke access at any time. |
| **Zero-Copy Architecture** | No data duplication—ROX queries your live data directly.       |
| **Real-Time Access**       | ROX always sees the latest data without ETL or batch jobs.     |
| **No Data Egress Fees**    | Sharing within Snowflake avoids cloud egress charges.          |
| **Secure by Default**      | All access governed by Snowflake's RBAC and encryption.        |

***

#### ROX Account Information

> **Contact your ROX account team** to obtain the following details required for setting up the data share:
>
> * **Account Locator** (e.g., `AB12345`) — used when adding ROX as a consumer in a **Direct Share (Option A)**
> * **Data Sharing Account Identifier** (org.account format, e.g., `ROXORG.ACCOUNTNAME`) — used when adding ROX as a consumer in a **Private Listing (Option B)**
> * **Region** — confirms whether you need Option A (same region) or Option B (cross-region)
>
> **Important:** The identifier format differs by method. Direct Shares use the **Account Locator**, while Private Listings require the full **Data Sharing Account Identifier** (org.account format).

***

#### Which Method Should You Use?

| Method                  | When to Use                                                                                                    | Benefits                                                                                              |
| ----------------------- | -------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| **Direct Secure Share** | Your Snowflake account is on **the same cloud and region** as ROX                                              | Simplest setup, instant access, no replication delay                                                  |
| **Private Listing**     | Your Snowflake account is on a **different cloud or region** than ROX (e.g., different AWS region, Azure, GCP) | Auto-Fulfillment handles cross-cloud replication automatically, works worldwide, configurable refresh |

> **Not sure which region you're on?** Run `SELECT CURRENT_REGION();` in your Snowflake account, then contact your ROX account team to confirm which method to use.

***

#### Prerequisites

| Requirement           | Details                                                                                                                                                                                                   |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Role**              | `ACCOUNTADMIN`, or a custom role with `CREATE SHARE`, `CREATE DATA EXCHANGE LISTING`, and `MANAGE LISTING AUTO FULFILLMENT` privileges                                                                    |
| **Auto-Fulfillment**  | For Private Listings (Option B), your Org Admin must enable auto-fulfillment — see the Pre-Steps under Option B below                                                                                     |
| **Provider Terms**    | Accept Snowflake Provider Terms of Service (prompted on first listing creation). For Private Listings, you must also accept the **Customer-Controlled Data Sharing Functionality Terms**.                 |
| **Snowflake Edition** | Auto-fulfillment works on all editions (Standard, Enterprise, Business Critical). If sharing policy-protected data (masking, row access policies), both accounts must be **Business Critical** or higher. |
| **Database Size**     | The database being shared via auto-fulfillment must be under **10 TB**. If larger, contact Snowflake Support to adjust the limit.                                                                         |
| **No Trial Accounts** | Auto-fulfillment is **not available** on Snowflake trial accounts.                                                                                                                                        |

***

#### Option A: Direct Secure Share (Same Region)

Use this method if your Snowflake account is on **the same region** as ROX.

**Steps**

1. **Create a Direct Share**
   * Navigate to **Data sharing → External sharing → Shared by you**
   * Click **Share → Create a Direct Share**
2. **Add Objects**
   * Select the tables, views, or secure views you want to share with ROX
3. **Add ROX as Consumer**
   * In the share settings, add the ROX **Account Locator** provided by your ROX account team
4. **Notify ROX**
   * Send your ROX contact:
     * Your Snowflake account identifier
     * The share name you created
     * Brief description of shared objects

> **Note on navigation:** These paths reflect the Snowsight UI as of January 2026. If your navigation menu still shows "Data Products," look under **Data Products → Private Sharing → Shared by My Account** and use **Share → Create a Direct Share**.

***

#### Option B: Private Listing with Auto-Fulfillment (Cross-Region)

Use this method if your Snowflake account is on a **different cloud or region** than ROX.

**Pre-Steps: Enable Cross-Region Auto-Fulfillment**

Before creating a cross-region Private Listing, your Snowflake organization must have auto-fulfillment enabled. This is a **one-time setup** that requires your Org Admin (`ORGADMIN` role).

**Step 1: Verify Your Account Is Part of a Snowflake Organization**

Run the following in your Snowflake account:

```sql
SELECT CURRENT_ORGANIZATION_NAME();
SELECT CURRENT_ACCOUNT_NAME();
```

Both should return values. If `CURRENT_ORGANIZATION_NAME()` returns `NULL`, contact Snowflake Support to link your account to an organization.

**Step 2: Check If Auto-Fulfillment Is Already Enabled**

```sql
-- Requires ORGADMIN role
USE ROLE ORGADMIN;

SELECT SYSTEM$IS_GLOBAL_DATA_SHARING_ENABLED_FOR_ACCOUNT('<your_account_name>');
```

Replace `<your_account_name>` with the value returned by `CURRENT_ACCOUNT_NAME()` in Step 1.

* If this returns **`true`** → Auto-fulfillment is already enabled. Skip to Step 4.
* If this returns **`false`** → Continue to Step 3.

**Step 3: Enable Auto-Fulfillment for Your Account**

```sql
-- Requires ORGADMIN role
USE ROLE ORGADMIN;

SELECT SYSTEM$ENABLE_GLOBAL_DATA_SHARING_FOR_ACCOUNT('<your_account_name>');
```

> **Don't have ORGADMIN access?** Contact your Snowflake Organization Administrator. If you're unsure who that is, file a Snowflake Support ticket requesting auto-fulfillment be enabled for your account.

**Step 4: Grant Privileges for Listing & Auto-Fulfillment Management**

After auto-fulfillment is enabled on the account, `ACCOUNTADMIN` can manage auto-fulfillment. If you need to delegate to other roles:

```sql
-- As ACCOUNTADMIN
USE ROLE ACCOUNTADMIN;

-- Grant auto-fulfillment management
GRANT MANAGE LISTING AUTO FULFILLMENT ON ACCOUNT TO ROLE <your_role>;

-- Grant listing creation (if using a custom role)
GRANT CREATE DATA EXCHANGE LISTING ON ACCOUNT TO ROLE <your_role>;
```

**Step 5: Confirm Everything Is Ready**

```sql
-- Verify auto-fulfillment is enabled (requires ORGADMIN)
USE ROLE ORGADMIN;
SELECT SYSTEM$IS_GLOBAL_DATA_SHARING_ENABLED_FOR_ACCOUNT('<your_account_name>');
-- Expected: true

-- Verify your region
SELECT CURRENT_REGION();

-- Get your full account identifier (you'll provide this to ROX)
SELECT CURRENT_ORGANIZATION_NAME() || '.' || CURRENT_ACCOUNT_NAME();
```

> **Tip:** Save your full account identifier from the last query — you'll need it when notifying ROX after setup.

**Steps**

1. **Start a Private Listing**

   * Navigate to **Data sharing → External sharing → Shared by you**
   * Click **Share → Publish to Specified Consumers**

   **Alternate path:** Navigate to **Marketplace → Provider Studio**, then click **Create listing** (top right) and select **Specified Consumers**.
2. **Attach Data Product**
   * Select **+ Select** to choose the database objects to attach to the listing
   * Add a title and description to help ROX identify the data
3. **Add ROX as Consumer**
   * In the **Who can access** section, click **+ Add**
   * Enter the ROX **Data Sharing Account Identifier** (`org_name.account_name` format) provided by your ROX account team
   * Snowflake will automatically detect cross-region and enable Auto-Fulfillment
4. **Configure Refresh Frequency**
   * Set refresh interval (recommended: **every 1–2 hours** for operational data)
   * Select a warehouse to use for auto-fulfillment
   * Snowflake uses SUB\_DATABASE auto-fulfillment by default, which replicates only the objects in your share — not the entire database
5. **Publish & Notify ROX**
   * Click **Publish** to make the listing live
   * Send your ROX contact:
     * Your Snowflake account identifier
     * Listing name and share name
     * Refresh frequency configured

> **First time creating a listing?** You'll be prompted to accept the Snowflake Provider Terms of Service and the Customer-Controlled Data Sharing Functionality Terms.

> **Note on navigation:** These paths reflect the Snowsight UI as of January 2026. If your navigation menu still shows "Data Products," look under **Data Products → Private Sharing** and use **Share → Publish to Specified Consumers**.

***

#### Choosing What to Share

| Object Type      | When to Use                                                                                    |
| ---------------- | ---------------------------------------------------------------------------------------------- |
| **Tables**       | Direct access to raw data. Use when ROX needs full table access.                               |
| **Views**        | Pre-filtered or joined data. Use to limit columns, apply row filters, or join multiple tables. |
| **Secure Views** | **Recommended for sensitive data.** Hides underlying SQL logic and table structure from ROX.   |

> **Best Practice:** Use Secure Views when sharing PII, financial data, or when you don't want ROX to see the underlying query logic or table structure.

> **Important for Cross-Region (Option B):** If your secure views use policies that reference **account-level roles** (e.g., using `INVOKER_ROLE` context function), be aware that auto-fulfillment does **not** replicate account-level roles. Use **database roles** with `IS_DATABASE_ROLE_IN_SESSION` instead. See [Snowflake documentation on auto-fulfillment objects](https://docs.snowflake.com/en/collaboration/provider-understand-auto-fulfillment-objects) for details.

***

#### Information to Provide to ROX

After setting up the share, send the following to your ROX account team:

* Your Snowflake **Account Locator** and **Data Sharing Account Identifier** (`org_name.account_name` format)
* Listing name (if using Private Listing) and Share name
* Brief description of shared objects and their schema
* Refresh frequency (if using Private Listing with Auto-Fulfillment)

***

#### Technical Considerations

**Security and Compliance**

* All data sharing respects your existing Snowflake RBAC policies
* ROX can only access objects explicitly granted to the share
* Audit logs available in Snowflake's `SNOWFLAKE.ACCOUNT_USAGE` schema

**Performance**

* Zero-copy sharing means no impact on your warehouse compute
* ROX queries run on ROX's compute resources, not yours
* For Private Listings, Auto-Fulfillment replication is incremental and optimized

**Data Freshness**

| Method              | Data Freshness                                                     |
| ------------------- | ------------------------------------------------------------------ |
| **Direct Share**    | Real-time (instant access to live data)                            |
| **Private Listing** | Based on configured refresh frequency (1 hour minimum recommended) |

**Cross-Region Costs (Option B Only)**

When using Private Listings with Auto-Fulfillment, the following costs apply:

| Cost Type         | Estimate                                                          |
| ----------------- | ----------------------------------------------------------------- |
| **Storage**       | \~$20–23/TB per month in US-based regions for the replicated copy |
| **Compute**       | \~3–5 credits/TB of replicated data for replication operations    |
| **Data Transfer** | Cross-region transfer fees vary by cloud provider and region pair |

> Initial replication may take longer for large datasets. Subsequent syncs are **incremental** — only changed data is transferred.

***

#### Troubleshooting

| Issue                                                           | Solution                                                                                                                                                                                                                                                      |
| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| "Following accounts cannot be added to this share" error        | This occurs when trying to add a consumer account in a **different region** to a Direct Share. Direct Shares only work within the same region. Use **Option B (Private Listing with Auto-Fulfillment)** instead.                                              |
| Cannot find ROX account when adding consumer                    | For **Direct Shares (Option A)**, use the **Account Locator** (e.g., `AB12345`). For **Private Listings (Option B)**, use the **Data Sharing Account Identifier** (`org_name.account_name` format). Contact your ROX account team for the correct identifier. |
| Auto-Fulfillment not available in listing UI                    | Ensure auto-fulfillment is enabled: run `SELECT SYSTEM$IS_GLOBAL_DATA_SHARING_ENABLED_FOR_ACCOUNT('<account>')` as `ORGADMIN`. If false, run `SYSTEM$ENABLE_GLOBAL_DATA_SHARING_FOR_ACCOUNT('<account>')`. Also confirm this is not a trial account.          |
| `SYSTEM$ENABLE_GLOBAL_DATA_SHARING_FOR_ACCOUNT` fails           | Ensure you are using the `ORGADMIN` role (`USE ROLE ORGADMIN;`). If you don't have ORGADMIN access, contact your Snowflake Organization Administrator or file a Snowflake Support ticket.                                                                     |
| "Your role does not have permission to set up auto-fulfillment" | The `ORGADMIN` role must first delegate privileges to `ACCOUNTADMIN`. See Pre-Steps under Option B, Step 4.                                                                                                                                                   |
| Share not visible to ROX                                        | Ensure the listing is published (not in draft state). Check under **Marketplace → Provider Studio → Listings**.                                                                                                                                               |
| Cross-region replication slow                                   | Check your configured refresh frequency. Initial sync may take longer for large datasets — subsequent syncs are incremental.                                                                                                                                  |
| Database too large for auto-fulfillment                         | Databases over 10 TB require a Snowflake Support ticket to adjust the limit. Alternatively, use secure views to share only the objects ROX needs.                                                                                                             |
| Cannot find Provider Studio                                     | Provider Studio is now under **Marketplace** in the left navigation menu. Click **Marketplace** to see Provider Studio with tabs for Home, Listings, Profiles, Requests, Analytics, and Settings.                                                             |
| Cannot find sharing UI / "Shared by My Account"                 | Direct shares are now under **Data sharing → External sharing → Shared by you** (previously under Data Products → Private Sharing).                                                                                                                           |
