--- title: "How to connect Google BigQuery to AI chats and Supermetrics Studio" slug: "how-to-connect-google-bigquery-to-ai-chats-and-supermetrics-studio" updated: 2026-11-25T07:41:10Z published: 2026-11-25T07:41:10Z canonical: "docs.supermetrics.com/how-to-connect-google-bigquery-to-ai-chats-and-supermetrics-studio" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.supermetrics.com/llms.txt > Use this file to discover all available pages before exploring further. # How to connect Google BigQuery to AI chats and Supermetrics Studio Use the AI-optimized Google BigQuery connector to explore your BigQuery data and run read-only SQL queries from AI chats and Supermetrics Studio. You can also use the BigQuery connector to read data from your Supermetrics Storage. This guide is for people who store data in BigQuery or Supermetrics Storage and want to analyze it in AI chats or build dashboards in Supermetrics Studio. > [!NOTE] > Note on availability > > This connector is in beta. We're still collecting feedback, so behavior, limits, and setup steps may change. > > The connector is available only in AI chats and Supermetrics Studio. > > Note that this connector is separate from our other Google BigQuery connectors and from the BigQuery destinations. See [table our BigQuery offering](/docs/how-to-connect-google-bigquery-to-ai-chats-and-supermetrics-studio#how-this-connector-differs-from-other-bigquery-options) ## What you can do with the connector After you connect to the BigQuery connector in AI chats and Studio through Google OAuth, you can use AI to browse your datasets, tables, and columns, and answer questions with the data in your own BigQuery data warehouse. - **In AI chats**: Connect your BigQuery data warehouse or Supermetrics Storage and ask questions in plain language. Your AI tool explores your datasets and tables, then writes and runs read-only SQL queries. You can also publish the results of an analysis from AI chats to a Supermetrics Studio board. - **In Supermetrics Studio**: Build dashboards on your BigQuery or Supermetrics Storage data. Supermetrics Studio dashboards use approved queries, so if you're sharing the dashboard, the viewers can't send their own SQL statements. They can change only the parameter values that the query allows. ## How this connector differs from other BigQuery options The BigQuery connector in AI chats and Studio is a standalone connector. It doesn't replace, upgrade, or change any of our existing connectors or destinations. Your existing setups continue to work as before. | Option | What it does | Where you can use it | | --- | --- | --- | | BigQuery connector for AI chats and Supermetrics Studio | Lets your AI tool read from your BigQuery data warehouse, including Supermetrics Storage, with read-only SQL. | AI chats and Supermetrics Studio only | | Google BigQuery connectors for spreadsheet and data visualization destinations | Pull data from your BigQuery tables into other destinations. | See [Google BigQuery connection guide](/v1/docs/google-bigquery-connection-guide) and [Google BigQuery (Legacy) connection guide](/v1/docs/google-bigquery-legacy-connection-guide) for all available destinations. | | BigQuery destinations | Moves your marketing data from Supermetrics into BigQuery. | Data warehouse destinations on the Supermetrics Hub. See [About BigQuery prerequisites](/v1/docs/about-bigquery-prerequisites). You can also use [BigQuery on the Google Marketplace](/v1/docs/how-to-enroll-a-supermetrics-data-source-in-bigquery-marketplace). | | Supermetrics Storage | Moves your marketing data into Supermetrics Storage, which uses BigQuery in the background. | Supermetrics Storage on the Supermetrics Hub. See [Supermetrics Storage](/v1/docs/supermetrics-storage). | ## Before you begin To use the connector, you need: - A Supermetrics subscription that includes AI chats or Supermetrics Studio, with the BigQuery connector in AI chats and Studio added to your team's subscription. - A Google account with the **BigQuery Job User** role on the Google Cloud project that runs your queries, and the **BigQuery Data Viewer** role on each dataset you want to read. To limit what the connector can read, grant BigQuery Data Viewer only on the datasets you want it to access. The Google Cloud project you choose runs your queries and pays for them. See [Usage and billing](/docs/how-to-connect-google-bigquery-to-ai-chats-and-supermetrics-studio#usage-and-billing). When you sign in, the Google consent screen asks only for **View your data in Google BigQuery**. The connector never asks for write access, and it can't write to, create, or change anything in your data warehouse. If your organization restricts third-party apps in Google Workspace, a Workspace admin may need to allow the Supermetrics app before you can sign in. If your BigQuery projects are inside a VPC Service Controls perimeter, the perimeter blocks Supermetrics requests. Supermetrics doesn't use fixed IP addresses, so an IP-based access level doesn't work. Ask your admin to add an ingress rule for the Google account that connects. ## Instructions ### Connect BigQuery in AI chats 1. Open your AI tool with Supermetrics connected. 2. Make sure you're connected to your AI tool with a team that has the BigQuery connector. See [How to connect Supermetrics to AI tools](/v1/docs/how-to-connect-supermetrics-to-ai-tools) if you haven't connected Supermetrics yet or are using the wrong team. 3. Ask your AI tool to use Supermetrics and connect to Google BigQuery using the BigQuery connector in AI chats and Studio. For example: `Using Supermetrics, connect to my BigQuery data warehouse using the BigQuery connector in AI chats and Studio`*.* Your AI tool gives you a login link. 4. Sign in with the Google account that has the roles listed in [Before you begin](/docs/how-to-connect-google-bigquery-to-ai-chats-and-supermetrics-studio#before-you-begin), and allow access on the Google consent screen. 5. Choose the Google Cloud project to use for running queries. Access tokens refresh automatically. A connection that sits idle for more than 1 hour keeps working without another sign-in. ### Ask questions about your BigQuery data in AI chats Name Supermetrics and the BigQuery connector in AI chats and Studio in your prompt, so that your AI tool picks this connector and not another Google BigQuery connector. Your AI tool then works through your data in steps. It lists your datasets, lists the tables in a dataset, lists the columns in a table, and runs a SQL query. Example prompts: - `Use the Supermetrics BigQuery connector to list the datasets in my BigQuery project.` - `Using the Supermetrics BigQuery connector to show the tables and columns in the sales dataset.` - `Use the Supermetrics BigQuery connector to show revenue by month from the orders table for the last 90 days.` > [!NOTE] > Tip > > Include a date range in your prompt for actual data queries for cost optimation and speed. If no date range is provided, your AI tool will infer a date range. If you're asking what data is available, a date range is not needed. ### Use BigQuery data in Supermetrics Studio You build a Supermetrics Studio dashboard by asking SuperAI for the data you want. SuperAI writes the SQL query and builds the dashboard. 1. Open Supermetrics Studio with the team that has the BigQuery connector, and start a new dashboard. 2. Ask SuperAI to use the BigQuery connector in AI chats and Studio. For example: `Use the BigQuery connector in AI chats and Studio to show revenue by month from the orders table.` 3. If your team has no BigQuery connection yet, SuperAI gives you a login link. Sign in with the Google account that has the roles listed in [Before you begin](/docs/how-to-connect-google-bigquery-to-ai-chats-and-supermetrics-studio#before-you-begin), and allow access on the Google consent screen. 4. Choose the Google Cloud project to use for running queries. 5. Ask for the data you want to see. SuperAI lists your datasets, tables, and columns, writes a SQL query for the specified date range, and builds the dashboard. 6. Change the date range on the dashboard to check that the data updates. > [!NOTE] > Approved queries > > When you run the dashboard for the first time, Supermetrics Studio approves its query. When you share the dashboard, the viewers see data only from approved queries. They can change only the parameter values that the query allows, and they can't send their own SQL. Only dashboard owners and editors can list datasets, tables, and columns. ## Usage and billing Querying a Cloud Data Warehouse will always involve costs. This section details what costs are incurred and where they arise for each step in the process. ### AI chats - **Query creation**: You’re consuming your own tokens from your AI tool provider. - **Query execution**: The billing account connected to your Google Cloud project will be charged based on "bytes billed" associated with your query. Queries executed against Supermetrics Storage are billed at the standard rate associated with your Supermetrics Storage plan. ### Supermetrics Studio - **Query creation**: Drafting a query in Supermetrics Studio consumes AI credits. - **Query execution**: The billing account connected to your Google Cloud project will be charged based on "bytes billed" associated with your query. Queries executed against Supermetrics Storage are billed at the standard rate associated with your Supermetrics Storage plan. ## Query rules and limits The connector applies these rules to every query. | Rule | What happens | What you can do | | --- | --- | --- | | Read-only, 1 statement | The connector runs 1 SELECT statement. It refuses DELETE, INSERT, CREATE TABLE, and similar statements, as well as queries with several statements. | Ask for a single SELECT query. | | Date range | Every SQL query needs a date range. The connector fills it into the `@start_date` and `@end_date` parameters. It refuses queries without one. | Include a date range in your prompt. | | 1 GB scan size | The connector refuses a query that’s estimated to scan more than 1 GB before it runs. | Narrow the query, for example with a shorter date range. | | 200,000 rows | The connector refuses results larger than 200,000 rows. | Add `LIMIT` to the query, or aggregate the results. | | 5 minutes | A query stops after 5 minutes. | Narrow the query or the date range. | | Native tables | The connector doesn't support external tables that read from Google Drive, such as Google Sheets. Other external tables, such as Cloud Storage, BigLake, and BigQuery Omni tables, aren't restricted. | Query a native BigQuery table. | Listing datasets, tables, and columns usually takes 2-3 seconds. Small queries usually take 2-5 seconds. The connector doesn't support connections from static IP addresses or allowlists. > [!NOTE] > Note on 403 errors > > As a security measure, Supermetrics screens all SQL statements through a Web Application Firewall (WAF) to prevent malicious queries from running against your database service. Occasionally, a legitimate query is blocked and returns a 403 error in AI chats or Supermetrics Studio. > > If you see this error: > > - Rewrite your query to avoid risky SQL keywords. AI chats and Studio can usually help you do this quickly. > - [Contact Supermetrics support](https://hub.supermetrics.com/support) if you believe your query is being blocked unnecessarily. > > While this connector is in beta, we’re closely monitoring blocked queries so we can protect your data while keeping functionality as broad as possible. ## More resources - [How to connect Supermetrics to AI tools](/v1/docs/how-to-connect-supermetrics-to-ai-tools) - [What happens in your AI tool and in Supermetrics](/v1/docs/what-happens-in-your-ai-tool-and-in-supermetrics) - [Supermetrics Studio](/v1/docs/supermetrics-studio)