> For the complete documentation index, see [llms.txt](https://docs.whaly.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.whaly.io/warehouse/google-bigquery/grant-access-to-bigquery-datasets.md). Agents can also search and read this documentation through its [MCP server](https://docs.whaly.io/~gitbook/mcp).

# Grant access to BigQuery datasets

By default, Whaly will only have access to the Datasets created by Whaly connectors. In order to grant access to already existing BigQuery Datasets, you should follow those steps:

1. Go to the BigQuery Admin Console

<figure><img src="https://34758050-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MC1g4I2_CgXd0qAq1P7%2Fuploads%2FxuKQ8pu1jNKJGPIBXeq6%2Fimage.png?alt=media&amp;token=ee769f00-0000-4189-926c-068ddd55ae58" alt=""><figcaption></figcaption></figure>

2. On the left panel, click on one Dataset name (ex. "Days") to open it
3. On the Dataset page, click on "Sharing > Permissions" menu item

<figure><img src="https://34758050-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MC1g4I2_CgXd0qAq1P7%2Fuploads%2F9ixpOIFg4Ka4YB3JQREu%2Fimage.png?alt=media&amp;token=422f2046-fae5-4c5b-923e-152fad70002e" alt=""><figcaption></figcaption></figure>

4. In the side panel that opens, click on "Add Principal"

<figure><img src="https://34758050-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MC1g4I2_CgXd0qAq1P7%2Fuploads%2FQrmDtOjCCKaT5Zq5OUHk%2Fimage.png?alt=media&amp;token=37565599-b84a-45c8-8e05-d94781017720" alt=""><figcaption></figcaption></figure>

5. In the "New principals" search bar, select the Service Account configured in Whaly. And in the "Assign roles", select the "BigQuery Data Viewer" role.

<figure><img src="https://34758050-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MC1g4I2_CgXd0qAq1P7%2Fuploads%2FaLgvNhBNYpqVxmEPBjyt%2Fimage.png?alt=media&amp;token=172855a4-604b-4602-9dd4-69ab942d07d9" alt=""><figcaption></figcaption></figure>

6. Click on "Save"

<figure><img src="https://34758050-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MC1g4I2_CgXd0qAq1P7%2Fuploads%2FAmgjghocWJCAstTSbxP4%2Fimage.png?alt=media&amp;token=d361de88-aa83-45b8-b482-6c798d7d5dd1" alt=""><figcaption></figcaption></figure>

And that's it! Whaly will now let users import tables from this BigQuery Dataset 🎉


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.whaly.io/warehouse/google-bigquery/grant-access-to-bigquery-datasets.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
