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

# Google BigQuery

> Connect Google BigQuery to your Atako agents — 9 read and 1 write actions.

Let your agents list BigQuery projects, datasets and tables, preview table data, run SQL queries and inspect jobs. The Google Cloud project queried (projectId) is an argument discovered by list\_projects.

## Connection

* **Authentication**: OAuth 2.0 — you authorize Atako via Google BigQuery's consent screen; no key to copy.
* **Scopes requested**:
  * `https://www.googleapis.com/auth/bigquery`

<Note>
  Nothing to paste: click Connect and authorize Atako from your Google account (the BigQuery API must be enabled in the Google Cloud project you query: console.cloud.google.com → APIs & Services → Enabled APIs → BigQuery API). Prerequisite on the Atako side: the administrator declares INTEGRATION\_OAUTH\_BIGQUERY\_CLIENT\_ID / \_CLIENT\_SECRET with the same Google OAuth app as Drive, Sheets and Docs.

  See [Google BigQuery's documentation](https://cloud.google.com/bigquery/docs/reference/rest).
</Note>

## Read actions (9)

| Action              | Description                                                                                                                                                                                                                                                           |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `get_dataset`       | Get full metadata for a dataset, including access controls, labels, default table expiration and description.                                                                                                                                                         |
| `get_job`           | Get metadata about a job: status (state, errorResult), configuration (query/load/extract), statistics (totalBytesProcessed) and user\_email.                                                                                                                          |
| `get_query_results` | Retrieve results of a query job by jobId (returned by run\_query when jobComplete is false). Returns rows, schema, jobComplete and pageToken for pagination.                                                                                                          |
| `get_table`         | Get table metadata: schema.fields (column names and types), numRows (approximate row count), numBytes, type (TABLE or VIEW), creationTime and expirationTime.                                                                                                         |
| `list_datasets`     | List datasets in a project. Returns dataset.datasetReference.datasetId and metadata (friendlyName, description, labels).                                                                                                                                              |
| `list_projects`     | List BigQuery projects to which the user has been granted any role. Returns project.id and project.numericId. Use project.id as the projectId argument in all other actions.                                                                                          |
| `list_routines`     | List routines (UDFs and stored procedures) in a dataset. Returns routine.routineReference.routineId, routineType and language.                                                                                                                                        |
| `list_table_data`   | Preview rows from a table without running a query. Response contains rows (array of \{f:\[\{v:...}]}) and schema.fields. Use maxResults to limit row count and selectedFields to pick columns (comma-separated, e.g. "name,age"). Returns a pageToken for pagination. |
| `list_tables`       | List tables in a dataset. Returns table.tableReference.tableId, type, creationTime and view (if a view).                                                                                                                                                              |

## Write actions (1)

| Action      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `run_query` | Execute a SQL query (Standard SQL, useLegacySql is forced to false). Returns rows, schema, totalBytesProcessed and jobComplete (false when results are still pending — call get\_query\_results with the jobId to wait). timeoutMs is capped at 10 000. dryRun=true estimates bytes without executing. Each query consumes billed bytes — this action has write scope. Optionally pass a defaultDataset to avoid fully-qualifying table names, or parameterized queryParameters. |

## Permissions

Every action above must be explicitly granted to an agent before it can be used. See [Permissions](/integrations/permissions) for the grant model and [Security](/integrations/security) for how credentials are protected.
