# Google BigQuery destination

> How to load Windsor.ai data into Google BigQuery with a scheduled destination task.

The Google BigQuery destination loads Windsor data into a BigQuery table on a schedule. It is the best choice for large datasets, long historical ranges, SQL analysis, and feeding BI tools that connect directly to a warehouse.

## Prerequisites

- A Google Cloud project with BigQuery enabled.
- A BigQuery dataset where Windsor can write tables.
- Either a Google account with Editor access or a service account with the `bigquery.dataEditor` role on the dataset.

## Setup

1. In Windsor, connect your data source(s) and configure your query (fields, date range, filters).
2. In the destination list, select **Google BigQuery**.
3. Authorize Windsor to access your Google Cloud project. Windsor will request BigQuery write permissions.
4. Enter:
   - **Project ID** — your Google Cloud project ID.
   - **Dataset** — the BigQuery dataset where the table should be created.
   - **Table name** — the name for the destination table.
5. Choose whether Windsor should **append** new rows on each sync or **replace** (overwrite) the table.
6. Click **Add Destination Task**.
7. Set the refresh schedule (daily or hourly depending on your plan).
8. Click **Save**.

Windsor will create the table on the first run and load data according to your schedule.

## Write modes

| Mode | Behavior |
| --- | --- |
| Replace (overwrite) | Truncates the table and rewrites all rows on each sync. Good for small tables where you always want a fresh full snapshot. |
| Append | Adds only new rows on each sync. Good for large tables where you want to accumulate history without re-loading everything. |

## Using BigQuery Data Transfer Service

If you prefer to use Google's native BigQuery Data Transfer Service to manage the ingestion job, see [How to use BigQuery Data Transfer Service with Windsor.ai](https://windsor.ai/documentation/troubleshooting/how-to-use-bigquery-data-transfer-service-with-windsor-ai.md).

## Pre-built data models (kits)

Windsor offers pre-configured data model kits that create analytics-ready table schemas in your warehouse for common sources (Google Ads, Facebook Ads, GA4, etc.). See [About Windsor.ai pre-built data models (kits)](https://windsor.ai/documentation/troubleshooting/about-windsor-ai-pre-built-data-models-kits.md).

## Troubleshooting

- [BigQuery destination: common problems and their solutions](https://windsor.ai/documentation/troubleshooting/bigquery-destination-common-problems-and-their-solutions.md)
- [How to fix the "Reauthentication is needed" error for BigQuery](https://windsor.ai/documentation/troubleshooting/reauthentication-needed-error-bigquery.md)
- [How to use BigQuery Data Transfer Service with Windsor.ai](https://windsor.ai/documentation/troubleshooting/how-to-use-bigquery-data-transfer-service-with-windsor-ai.md)
- [About Windsor.ai pre-built data models (kits)](https://windsor.ai/documentation/troubleshooting/about-windsor-ai-pre-built-data-models-kits.md)
