# BigQuery

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

### Introduction

The **ROX BigQuery Integration** enables customers to share live data directly from Google BigQuery to ROX using **Analytics Hub**. This integration provides secure, governed access to your data without copying or moving it—you retain full control while ROX gains real-time access to your datasets.

***

### Key Benefits

| Benefit                    | Description                                                            |
| -------------------------- | ---------------------------------------------------------------------- |
| **Full Control**           | Data stays in your project. You can revoke access at any time.         |
| **Zero-Copy Architecture** | No data duplication—ROX queries your live data via linked datasets.    |
| **Real-Time Access**       | ROX always sees the latest data without ETL or batch jobs.             |
| **Secure by Default**      | All access governed by Google Cloud IAM and Analytics Hub permissions. |

***

### ROX Account Information

> **Contact your ROX account team** to obtain the ROX service account email required for setting up the Analytics Hub exchange.

***

### Setup Instructions

#### Step 1: Create an Analytics Hub Exchange

1. In the Google Cloud Console, navigate to **BigQuery → Analytics Hub**
2. Click **Create Exchange**
3. Select the **Project** and **Region** where your dataset lives

> **Important:** The Exchange region must match your dataset's region. Choose the region where the data you want to share is located.

#### Step 2: Add ROX as a Subscriber

1. In the Exchange configuration, locate the **Subscribers** section
2. Add the **ROX service account** (provided by your ROX account team) to the Subscribers list
3. Save the Exchange configuration

#### Step 3: Create a Listing

1. Click into your newly created Exchange
2. Click **Create Listing**
3. Select the **dataset** you want to share with ROX

> **Note:** Only datasets in the same region as the Exchange will appear in the selection list. If your dataset doesn't appear, verify the regions match.

4. Complete the naming and configuration prompts
5. Publish the listing

#### Step 4: Notify ROX

Once the listing is published, send the following to your ROX account team:

* Your Google Cloud Project ID
* Exchange name and region
* Listing name
* Brief description of shared datasets and their schema

***

### 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 aggregated data. Use to limit columns, apply row filters, or join multiple tables. |
| **Authorized Views** | **Recommended for sensitive data.** Provides row-level or column-level access control.             |

> **Best Practice:** Use Authorized Views when sharing PII or financial data to enforce fine-grained access controls.

***

### Information to Provide to ROX

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

* Your Google Cloud Project ID
* Exchange name and region
* Listing name
* Brief description of shared datasets and their schema

***

### Prerequisites

| Requirement          | Details                                                                     |
| -------------------- | --------------------------------------------------------------------------- |
| **IAM Role**         | `roles/analyticshub.admin` or `roles/analyticshub.publisher` on the project |
| **Dataset Location** | Dataset must be in a region supported by Analytics Hub                      |
| **BigQuery API**     | BigQuery and Analytics Hub APIs must be enabled on your project             |

***

### Technical Considerations

#### Security and Compliance

* All data sharing respects your existing Google Cloud IAM policies
* ROX can only access datasets explicitly shared via Analytics Hub listings
* Audit logs available in Cloud Logging for all access events

#### Performance

* Linked datasets provide direct query access with no data movement
* ROX queries run on ROX's BigQuery slots, not yours
* No impact on your project's query performance or quota

#### Data Freshness

* **Real-time** — ROX always queries your live data directly
* No replication delay or sync schedules

***

### Troubleshooting

| Issue                                       | Solution                                                          |
| ------------------------------------------- | ----------------------------------------------------------------- |
| Dataset not appearing when creating listing | Verify the dataset region matches the Exchange region             |
| ROX cannot see the listing                  | Confirm the ROX service account was added as a Subscriber         |
| Permission denied errors                    | Verify your IAM role includes Analytics Hub publisher permissions |
| Listing not visible to ROX                  | Ensure the listing is published (not in draft state)              |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rox.com/development/engineering/docs/rox-enterprise-integrations/data-warehouse-integration/bigquery.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
