> For the complete documentation index, see [llms.txt](https://docs.hockeystack.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hockeystack.com/integrations/datasyncs/connecting-your-warehouse/authenticate-bigquery.md).

# Authenticate BigQuery

### Ensure that DataSyncs has correct permissions to access your BigQuery instance

1. Go to **Google Cloud Console → IAM & Admin → Service Accounts**.
2. Click **Create Service Account**, name it, and click **Create**.
3. **Assign Permissions**
   * Grant **BigQuery Data Viewer** (`roles/bigquery.dataViewer`) for ***read*** access or **Big Query Data Editor** (`roles/bigquery.dataEditor`) for ***write*** access.
   * Grant **BigQuery Job User** (`roles/bigquery.jobUser`) to allow query execution.
     * This permission is necessary to ensure that we can actually pull information
4. After service account user creation, create a new JSON key and download it securely. This key will be used as part of the authentication for BigQuery

### **Gather Connection Information for DataSyncs**

* The JSON key you downloaded will have connection information that you can directly upload when configuring a sync
* **Dataset ID:** the specific dataset that contains the table you are importing&#x20;
* **Table Name:** the specific table that you are importing

### Setting a limit on service account user (optional)

Larger imports (>100k rows) can increase compute costs. Setting a quota ensure no unexpected compute costs:&#x20;

* Refer to BigQuery's[ Quota and Limits documentation](https://cloud.google.com/bigquery/quotas) to see which options are available to as limits you can set on the service account you are providing to DataSyncs


---

# 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 dynamically by asking a question.

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

```
GET https://docs.hockeystack.com/integrations/datasyncs/connecting-your-warehouse/authenticate-bigquery.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
