> ## Documentation Index
> Fetch the complete documentation index at: https://squad.so/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Google BigQuery

> What agents can do in Google BigQuery at each access level, and how to connect, limit, and disconnect Google BigQuery.

Connect Google BigQuery so your agents can work in your Google BigQuery account. You choose an access level for each account, and Squad refuses any agent action outside that level.

## Access levels

Each Google BigQuery account has an access level: **Read-only** and **Read + write**. Squad refuses any agent action outside that level. You can also narrow or block single agents under **Per-agent access**.

| Level                       | The connect window describes this level as | Actions agents can use |
| --------------------------- | ------------------------------------------ | ---------------------- |
| **Read-only** (recommended) | "Run queries and view data."               | 33 of 63               |
| **Read + write**            | "Query, insert, and manage data."          | 58 of 63               |

**Read-only** is the recommended level. The connect window selects it for you, and you can choose another level.

The Google BigQuery sign-in page asks you to approve full access to your account. This is expected. Squad does not narrow the sign-in. It checks every agent action against the level you chose, and it refuses actions outside that level.

## What agents can do at each level

Each level opens with a short summary in plain tasks, then lists every action it adds, grouped by what the action works on. You do not need to name actions. Ask in plain words, and the agent searches for the matching action.

<Tip>**Find an action.** Open a level and use your browser's find (Ctrl+F, or Cmd+F on a Mac) with a word from the task or part of a slug. Or ask your agent in plain words, for example "What can you do in my Google BigQuery account?" The agent can search the Google BigQuery actions for you.</Tip>

Each action shows its name, a one-line description where the Google BigQuery action catalog has one, and its slug. The slug is the ID that agents use when they call the action.

<AccordionGroup>
  <Accordion title="Read-only (recommended)">
    Agents can use 33 of the 63 Google BigQuery actions at this level:

    * View policies
    * View connections
    * View datasets
    * View query jobs
    * View routines
    * View tables
    * View account details
    * View groups
    * View locations
    * View projects
    * View reservations
    * Test roles and permissions

    All 33 actions at this level:

    <AccordionGroup>
      <Accordion title="Account details (1)">
        | Action              | What it does                                                                       | Slug                                 |
        | ------------------- | ---------------------------------------------------------------------------------- | ------------------------------------ |
        | Get service account | Get the service account for a project used for interactions with Google Cloud KMS. | `GOOGLEBIGQUERY_GET_SERVICE_ACCOUNT` |
      </Accordion>

      <Accordion title="Connections (2)">
        | Action                     | What it does                                                                     | Slug                                        |
        | -------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------- |
        | List big query connections | List BigQuery connections in a given project and location.                       | `GOOGLEBIGQUERY_LIST_BIG_QUERY_CONNECTIONS` |
        | List locations connections | List BigQuery connections in a given project and location using the v1beta1 API. | `GOOGLEBIGQUERY_LIST_LOCATIONS_CONNECTIONS` |
      </Accordion>

      <Accordion title="Datasets (2)">
        | Action        | What it does                                                                    | Slug                           |
        | ------------- | ------------------------------------------------------------------------------- | ------------------------------ |
        | Get dataset   | Retrieve BigQuery dataset metadata including location via the datasets.get API. | `GOOGLEBIGQUERY_GET_DATASET`   |
        | List datasets | List datasets in a specific BigQuery project, including dataset locations.      | `GOOGLEBIGQUERY_LIST_DATASETS` |
      </Accordion>

      <Accordion title="Groups (1)">
        | Action                  | What it does                                                                | Slug                                     |
        | ----------------------- | --------------------------------------------------------------------------- | ---------------------------------------- |
        | List reservation groups | List all BigQuery reservation groups for a project in a specified location. | `GOOGLEBIGQUERY_LIST_RESERVATION_GROUPS` |
      </Accordion>

      <Accordion title="Locations (2)">
        | Action                      | What it does                                                                             | Slug                                         |
        | --------------------------- | ---------------------------------------------------------------------------------------- | -------------------------------------------- |
        | List locations              | List information about supported locations for BigQuery Data Transfer Service.           | `GOOGLEBIGQUERY_LIST_LOCATIONS`              |
        | List locations datapolicies | List all data policies in a specified parent project and location using the v2beta1 API. | `GOOGLEBIGQUERY_LIST_LOCATIONS_DATAPOLICIES` |
      </Accordion>

      <Accordion title="Organizations (1)">
        | Action                           | What it does                                                                                        | Slug                                              |
        | -------------------------------- | --------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
        | List organization data exchanges | List all data exchanges from projects in a given organization and location using Analytics Hub API. | `GOOGLEBIGQUERY_LIST_ORGANIZATION_DATA_EXCHANGES` |
      </Accordion>

      <Accordion title="Policies (4)">
        | Action                    | What it does                                                            | Slug                                       |
        | ------------------------- | ----------------------------------------------------------------------- | ------------------------------------------ |
        | Get connection iam policy | Get the IAM access control policy for a BigQuery connection resource.   | `GOOGLEBIGQUERY_GET_CONNECTION_IAM_POLICY` |
        | Get routine iam policy    | Retrieve the IAM access control policy for a BigQuery routine resource. | `GOOGLEBIGQUERY_GET_ROUTINE_IAM_POLICY`    |
        | Get table iam policy      | Retrieve the IAM access control policy for a BigQuery table resource.   | `GOOGLEBIGQUERY_GET_TABLE_IAM_POLICY`      |
        | List row access policies  | List all row access policies on a specified BigQuery table.             | `GOOGLEBIGQUERY_LIST_ROW_ACCESS_POLICIES`  |
      </Accordion>

      <Accordion title="Projects (1)">
        | Action        | What it does                                                                | Slug                           |
        | ------------- | --------------------------------------------------------------------------- | ------------------------------ |
        | List projects | List BigQuery projects to which the user has been granted any project role. | `GOOGLEBIGQUERY_LIST_PROJECTS` |
      </Accordion>

      <Accordion title="Queries (1)">
        | Action            | What it does                                     | Slug                               |
        | ----------------- | ------------------------------------------------ | ---------------------------------- |
        | Get query results | Get the results of a BigQuery query job via RPC. | `GOOGLEBIGQUERY_GET_QUERY_RESULTS` |
      </Accordion>

      <Accordion title="Query jobs (2)">
        | Action    | What it does                                          | Slug                       |
        | --------- | ----------------------------------------------------- | -------------------------- |
        | Get job   | Retrieve information about a specific BigQuery job.   | `GOOGLEBIGQUERY_GET_JOB`   |
        | List jobs | List all jobs that you started in a BigQuery project. | `GOOGLEBIGQUERY_LIST_JOBS` |
      </Accordion>

      <Accordion title="Reports (1)">
        | Action                      | What it does                                              | Slug                                         |
        | --------------------------- | --------------------------------------------------------- | -------------------------------------------- |
        | List analytics hub listings | List all listings in a given Analytics Hub data exchange. | `GOOGLEBIGQUERY_LIST_ANALYTICS_HUB_LISTINGS` |
      </Accordion>

      <Accordion title="Reservations (2)">
        | Action                       | What it does                                                          | Slug                                          |
        | ---------------------------- | --------------------------------------------------------------------- | --------------------------------------------- |
        | List reservation assignments | List BigQuery reservation assignments.                                | `GOOGLEBIGQUERY_LIST_RESERVATION_ASSIGNMENTS` |
        | List reservations            | List all BigQuery reservations for a project in a specified location. | `GOOGLEBIGQUERY_LIST_RESERVATIONS`            |
      </Accordion>

      <Accordion title="Roles and permissions (1)">
        | Action                       | What it does                                                     | Slug                                          |
        | ---------------------------- | ---------------------------------------------------------------- | --------------------------------------------- |
        | Test routine iam permissions | Test which IAM permissions the caller has on a BigQuery routine. | `GOOGLEBIGQUERY_TEST_ROUTINE_IAM_PERMISSIONS` |
      </Accordion>

      <Accordion title="Routines (2)">
        | Action        | What it does                                                                            | Slug                           |
        | ------------- | --------------------------------------------------------------------------------------- | ------------------------------ |
        | Get routine   | Retrieve a BigQuery routine (user-defined function or stored procedure) by its ID.      | `GOOGLEBIGQUERY_GET_ROUTINE`   |
        | List routines | List all routines (user-defined functions and stored procedures) in a BigQuery dataset. | `GOOGLEBIGQUERY_LIST_ROUTINES` |
      </Accordion>

      <Accordion title="Schemas (1)">
        | Action           | What it does                                                            | Slug                              |
        | ---------------- | ----------------------------------------------------------------------- | --------------------------------- |
        | Get table schema | Fetch a BigQuery table's schema and metadata without querying row data. | `GOOGLEBIGQUERY_GET_TABLE_SCHEMA` |
      </Accordion>

      <Accordion title="Tables (2)">
        | Action          | What it does                                                   | Slug                             |
        | --------------- | -------------------------------------------------------------- | -------------------------------- |
        | List table data | List the content of a BigQuery table in rows via the REST API. | `GOOGLEBIGQUERY_LIST_TABLE_DATA` |
        | List tables     | List tables in a BigQuery dataset via the REST API.            | `GOOGLEBIGQUERY_LIST_TABLES`     |
      </Accordion>

      <Accordion title="Templates (1)">
        | Action               | What it does                                                     | Slug                                  |
        | -------------------- | ---------------------------------------------------------------- | ------------------------------------- |
        | List query templates | List all query templates in a given Analytics Hub data exchange. | `GOOGLEBIGQUERY_LIST_QUERY_TEMPLATES` |
      </Accordion>

      <Accordion title="Other actions (6)">
        | Action                      | What it does                                                                                 | Slug                                         |
        | --------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------- |
        | Get BigQuery model          | Retrieve a specific BigQuery ML model resource by model ID.                                  | `GOOGLEBIGQUERY_GET_BIGQUERY_MODEL`          |
        | List capacity commitments   | List all capacity commitments for the admin project.                                         | `GOOGLEBIGQUERY_LIST_CAPACITY_COMMITMENTS`   |
        | List dataexchanges listings | List all listings in a given Analytics Hub data exchange using the v1beta1 API.              | `GOOGLEBIGQUERY_LIST_DATAEXCHANGES_LISTINGS` |
        | List models                 | List all BigQuery ML models in a specified dataset.                                          | `GOOGLEBIGQUERY_LIST_MODELS`                 |
        | Query                       | Query Tool runs a SQL query in BigQuery using the REST API.                                  | `GOOGLEBIGQUERY_QUERY`                       |
        | Search all assignments      | Search all BigQuery reservation assignments for a specified resource in a particular region. | `GOOGLEBIGQUERY_SEARCH_ALL_ASSIGNMENTS`      |
      </Accordion>
    </AccordionGroup>
  </Accordion>

  <Accordion title="Read + write">
    Agents can use 58 of the 63 Google BigQuery actions at this level: everything in **Read-only**, plus:

    * Create and update datasets
    * Create and cancel query jobs
    * Create and update tables
    * Create and update connections
    * Create and update routines
    * Update policies
    * Create reservations
    * Create templates

    The 25 actions that this level adds to **Read-only**:

    | Works on          | Action                        | What it does                                                                                                                                     | Slug                                           |
    | ----------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------- |
    | **Connections**   | Create connection             | Create a new BigQuery connection to external data sources using the BigQuery Connection API.                                                     | `GOOGLEBIGQUERY_CREATE_CONNECTION`             |
    |                   | Update connection             | Update a specified BigQuery connection using the BigQuery Connection API.                                                                        | `GOOGLEBIGQUERY_UPDATE_CONNECTION`             |
    | **Datasets**      | Create dataset                | Create a new BigQuery dataset with explicit location, labels, and description using the BigQuery Datasets API.                                   | `GOOGLEBIGQUERY_CREATE_DATASET`                |
    |                   | Patch dataset                 | Update an existing BigQuery dataset using RFC5789 PATCH semantics.                                                                               | `GOOGLEBIGQUERY_PATCH_DATASET`                 |
    |                   | Undelete dataset              | Undelete a BigQuery dataset within the time travel window.                                                                                       | `GOOGLEBIGQUERY_UNDELETE_DATASET`              |
    |                   | Update dataset                | Update information in an existing BigQuery dataset using the PUT method.                                                                         | `GOOGLEBIGQUERY_UPDATE_DATASET`                |
    | **Locations**     | Create locations datapolicies | Create a new data policy under a project with specified location using the v2beta1 BigQuery Data Policy API.                                     | `GOOGLEBIGQUERY_CREATE_LOCATIONS_DATAPOLICIES` |
    | **Policies**      | Set routine iam policy        | Set the IAM access control policy for a BigQuery routine resource.                                                                               | `GOOGLEBIGQUERY_SET_ROUTINE_IAM_POLICY`        |
    | **Query jobs**    | Cancel job                    | Cancel a running BigQuery job.                                                                                                                   | `GOOGLEBIGQUERY_CANCEL_JOB`                    |
    |                   | Insert job                    | Start a new asynchronous BigQuery job (query, load, extract, or copy).                                                                           | `GOOGLEBIGQUERY_INSERT_JOB`                    |
    |                   | Insert job with upload        | Start a new BigQuery load job with file upload.                                                                                                  | `GOOGLEBIGQUERY_INSERT_JOB_WITH_UPLOAD`        |
    | **Reservations**  | Create reservation            | Create a new BigQuery reservation resource to guarantee compute capacity (slots) for query and pipeline jobs.                                    | `GOOGLEBIGQUERY_CREATE_RESERVATION`            |
    |                   | Create reservation assignment | Create a BigQuery reservation assignment that allows a project, folder, or organization to submit jobs using slots from a specified reservation. | `GOOGLEBIGQUERY_CREATE_RESERVATION_ASSIGNMENT` |
    | **Routines**      | Create routine                | Create a new user-defined routine (function or procedure) in a BigQuery dataset.                                                                 | `GOOGLEBIGQUERY_CREATE_ROUTINE`                |
    |                   | Update routine                | Update an existing BigQuery routine (function or stored procedure).                                                                              | `GOOGLEBIGQUERY_UPDATE_ROUTINE`                |
    | **Tables**        | Create table                  | Create a new, empty table in a BigQuery dataset.                                                                                                 | `GOOGLEBIGQUERY_CREATE_TABLE`                  |
    |                   | Patch table                   | Update specific fields in an existing BigQuery table using RFC5789 PATCH semantics.                                                              | `GOOGLEBIGQUERY_PATCH_TABLE`                   |
    |                   | Update table                  | Update an existing BigQuery table.                                                                                                               | `GOOGLEBIGQUERY_UPDATE_TABLE`                  |
    | **Templates**     | Create query template         | Create a new query template in a BigQuery Analytics Hub Data Clean Room (DCR) data exchange.                                                     | `GOOGLEBIGQUERY_CREATE_QUERY_TEMPLATE`         |
    | **Other actions** | Create capacity commitment    | Create a new capacity commitment resource in BigQuery Reservation.                                                                               | `GOOGLEBIGQUERY_CREATE_CAPACITY_COMMITMENT`    |
    |                   | Create data exchange          | Create a new Analytics Hub data exchange for sharing BigQuery datasets.                                                                          | `GOOGLEBIGQUERY_CREATE_DATA_EXCHANGE`          |
    |                   | Create dataexchanges listings | Create a new listing in a BigQuery Analytics Hub data exchange.                                                                                  | `GOOGLEBIGQUERY_CREATE_DATAEXCHANGES_LISTINGS` |
    |                   | Create listing                | Create a new listing in a data exchange using Analytics Hub API.                                                                                 | `GOOGLEBIGQUERY_CREATE_LISTING`                |
    |                   | Insert all                    | Stream data into BigQuery one record at a time without running a load job.                                                                       | `GOOGLEBIGQUERY_INSERT_ALL`                    |
    |                   | Patch model                   | Update specific fields in an existing BigQuery ML model using PATCH semantics.                                                                   | `GOOGLEBIGQUERY_PATCH_MODEL`                   |
  </Accordion>
</AccordionGroup>

## Connect Google BigQuery

Before you start:

* You need a Google BigQuery account that you can sign in to.
* Your Squad subscription must be active. Squad does not connect apps while the subscription is not active.

<Steps>
  <Step title="Open Integrations">
    Open **Settings** > **Integrations**.
  </Step>

  <Step title="Add an integration">
    On the **Connected apps** tab, click **+ Add integration**.
  </Step>

  <Step title="Find Google BigQuery">
    Find **Google BigQuery** in the catalog and click it. You can type the name in **Search the catalog…**.
  </Step>

  <Step title="Choose an access level">
    Under **Default scope**, choose an access level. This level applies to every agent.
  </Step>

  <Step title="Click Connect Google BigQuery">
    Click **Connect Google BigQuery**. The Google BigQuery sign-in page opens in a new tab.
  </Step>

  <Step title="Sign in to Google BigQuery">
    Sign in to Google BigQuery and approve the request.
  </Step>
</Steps>

Check that it works: Google BigQuery shows under **YOUR CONNECTIONS**, with a row for the account and its access level.

## Change the access level

1. Under **YOUR CONNECTIONS**, find the Google BigQuery account.
2. Open the account menu (⋯) and click **Manage scope**.
3. Under **Default scope**, choose the new level.
4. Click **Save access**.

The change does not need a new sign-in. Agents get the new level from their next call.

## Set access for one agent

Every agent uses the account's level unless you set something else for it. You can narrow one agent to a lower level, or block it.

1. Under **YOUR CONNECTIONS**, open the account menu (⋯) on the Google BigQuery account.
2. Click **Manage scope**.
3. Under **Per-agent access**, find the agent.
4. Choose the **Default** option to follow the account's level, choose a lower level, or choose **No access**.
5. Click **Save access**.

An agent never gets more than the account's level, even if you choose a higher level for it. Changes apply from the agent's next call. An agent with **No access** does not see the account.

## Use more than one Google BigQuery account

Click **+ Account** on the Google BigQuery card to connect another account. Agents use the primary account unless they are asked to use a specific one.

* After you click **+ Account**, follow the connect steps above.
* Each account has its own access level.
* The first account you connect becomes the primary account. It shows **★ PRIMARY**.
* To change the primary account, open the account menu (⋯) and click **Make primary**.
* To tell accounts apart, open the account menu (⋯) and click **Rename**.

## Reconnect or disconnect

Reconnect when the connection has expired, or when you need to change what the account can reach on the Google BigQuery side:

1. Open the account menu (⋯) and click **Reconnect**.
2. Click **Reauthorize on Google BigQuery**.
3. Sign in to Google BigQuery and approve the request.

Reconnect signs in to the same account again. It does not add a second connection.

Open the account menu (⋯) on the Google BigQuery account and click **Disconnect**. Agents lose access to that account at once.

<Warning>**Disconnect** acts at once, with no confirmation step. If it was the primary account, another connected Google BigQuery account becomes primary.</Warning>

## Costs

Google BigQuery actions do not use Squad credits. Connected apps never use credits. For what does use credits, see [What Squad costs](/docs/costs).

## Troubleshooting

An agent reports that an action is not allowed on this account.

* Cause: the action is outside the account's access level, or outside the level you set for that agent.
* Fix: choose a higher level in **Manage scope**, or change the agent's row under **Per-agent access**.

An agent says it has no access to Google BigQuery, or it does not see the account.

* Cause: the agent is set to **No access** under **Per-agent access**, or the account is not connected.
* Fix: open **Manage scope** and change the agent's row. If the account is missing, connect it again.

Connecting or saving fails with "Your subscription isn't active."

* Cause: your Squad subscription is not active.
* Fix: resubscribe. See [Manage your subscription](/docs/billing).

An agent says the Google BigQuery connection has expired.

* Cause: the sign-in for that account is no longer valid.
* Fix: use **Reconnect** on the account.

## Common questions

<AccordionGroup>
  <Accordion title="Can I limit what agents can do in Google BigQuery?">
    Each Google BigQuery account has an access level: **Read-only** and **Read + write**. Squad refuses any agent action outside that level. You can also narrow or block single agents under **Per-agent access**.
  </Accordion>

  <Accordion title="Can I connect more than one Google BigQuery account?">
    Click **+ Account** on the Google BigQuery card to connect another account. Agents use the primary account unless they are asked to use a specific one.
  </Accordion>

  <Accordion title="How do I disconnect Google BigQuery?">
    Open the account menu (⋯) on the Google BigQuery account and click **Disconnect**. Agents lose access to that account at once.
  </Accordion>
</AccordionGroup>

## Related pages

<CardGroup cols={2}>
  <Card title="Connect apps" icon="plug" href="/docs/integrations" />

  <Card title="Add an MCP server or an API key" icon="server" href="/docs/custom-integrations">
    Use this when an action you need is not in this app.
  </Card>
</CardGroup>
