> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidocs.polytomic.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://apidocs.polytomic.com/_mcp/server.

# Google BigQuery

Supports:
* ✅ Models
* ✅ Model sync destination
* ✅ Bulk sync source
* ✅ Bulk sync destination




## Connection

### Configuration
<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>auth_method</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Authentication method<br/><br/>Accepted values: `service_account_key` <a href="#auth-method-service-account-key">↓</a>, `workload_identity_federation` <a href="#auth-method-workload-identity-federation">↓</a>, `application_default_credentials`</td>
<td><code>true</code></td>
</tr>
<tr>
<td><code>location</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Location (optional)<br/><br/>Region or multi-region for query operations</td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>structured_values_as_json</code></td>
<td><code>boolean</code></td>
<td style="vertical-align: top;">Write object and array values as JSON</td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>use_bulk_sync_staging_schema</code></td>
<td><code>boolean</code></td>
<td style="vertical-align: top;">Use custom bulk sync staging schema <a href="#use-bulk-sync-staging-schema">↓</a></td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>use_extract</code></td>
<td><code>boolean</code></td>
<td style="vertical-align: top;">Use extract for bulk sync from BigQuery <a href="#use-extract">↓</a></td>
<td><code>false</code></td>
</tr>
</tbody>
</table>

<h4 id="use-extract">`use_extract`</h4>

<h5 id="use-extract-true">When `use_extract` is `true`</h5>

<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>bucket</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Google Cloud Storage bucket</td>
<td><code>true</code></td>
</tr>
</tbody>
</table>


<h4 id="use-bulk-sync-staging-schema">`use_bulk_sync_staging_schema`</h4>

<h5 id="use-bulk-sync-staging-schema-true">When `use_bulk_sync_staging_schema` is `true`</h5>

<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>bulk_sync_staging_schema</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Staging schema name</td>
<td><code>true</code></td>
</tr>
</tbody>
</table>


<h4 id="auth-method">`auth_method`</h4>

<h5 id="auth-method-workload-identity-federation">When `auth_method` is `workload_identity_federation`</h5>

<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>credential_config</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Credential configuration JSON file downloaded from Google Cloud</td>
<td><code>true</code></td>
</tr>
<tr>
<td><code>wif_project_id</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Google Cloud project ID</td>
<td><code>true</code></td>
</tr>
</tbody>
</table>

<h5 id="auth-method-service-account-key|application-default-credentials">When `auth_method` is `service_account_key|application_default_credentials`</h5>

<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>override_project_id</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Override project ID (optional)<br/><br/>Override the default project ID for cross-project access</td>
<td><code>false</code></td>
</tr>
</tbody>
</table>

<h5 id="auth-method-service-account-key">When `auth_method` is `service_account_key`</h5>

<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>service_account</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Service account key</td>
<td><code>true</code></td>
</tr>
</tbody>
</table>



#### Example

```json
{
  "name": "Google BigQuery connection",
  "type": "bigquery",
  "configuration": {
    "auth_method": "",
    "location": "us-east1",
    "structured_values_as_json": false,
    "use_bulk_sync_staging_schema": false,
    "use_extract": false
  }
}
```

### Read-only properties
<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
</tbody>
</table>

<h4 id="auth-method">`auth_method`</h4>

<h5 id="auth-method-service-account-key">When `auth_method` is `service_account_key`</h5>

<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>client_email</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Service account identity</td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>project_id</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Service account project ID</td>
<td><code>false</code></td>
</tr>
</tbody>
</table>



## Model Sync
### Source
#### Configuration
<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>dataset</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Dataset</td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>query</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;"></td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>table</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Table</td>
<td><code>false</code></td>
</tr>
</tbody>
</table>


#### Example
```json
{
  ...
  "configuration": {
    "dataset": "nyctaxi",
    "query": "SELECT * from sampledata.nyctaxi.taxis",
    "table": "taxis"
  }
}
```

### Target
Google BigQuery connections may be used as the destination in a model sync.




### Target creation

Google BigQuery connections may be used to create a new target for a model sync. The
following parameters are required to create a new target:

<table>
<thead>
<tr>
  <th>NAME</th>
  <th>DESCRIPTION</th>
  <th>ENUM</th>
</tr></thead>
<tbody>
<tr>
  <td>dataset</td>
  <td>Dataset</td>
  <td>true</td>
</tr>

<tr>
  <td>name</td>
  <td>Table name</td>
  <td>false</td>
</tr>

</tbody>
</table>




## Bulk Sync
### Source
Google BigQuery connections may be used as a bulk sync source. No additional configuration options are required.

### Destination
#### Configuration
<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>advanced</code></td>
<td><code>object</code></td>
<td style="vertical-align: top;"></td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>dataset</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Output dataset</td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>mirror_schemas</code></td>
<td><code>boolean</code></td>
<td style="vertical-align: top;">Mirror schemas</td>
<td><code>false</code></td>
</tr>
</tbody>
</table>


#### Example
```json
{
  ...
  "destination_configuration": {
    "advanced": {
        "empty_strings_null": false,
        "expire_tables_after_inactivity": false,
        "hard_deletes": false,
        "initial_execution": "",
        "table_expiry_days": 0,
        "table_prefix": "",
        "truncate_existing": false
    },
    "dataset": "dataset",
    "mirror_schemas": false
  }
}
```



## Type handling
### Destination types
|       POLYTOMIC TYPE        |     GOOGLE BIGQUERY TYPE      |
|-----------------------------|-------------------------------|
| `array<>`                   | `JSON`                        |
| `bigint`                    | `INTEGER`                     |
| `boolean`                   | `BOOLEAN`                     |
| `date`                      | `DATE`                        |
| `datetime`                  | `TIMESTAMP`                   |
| `decimal(precision, scale)` | `BIGNUMERIC(precision,scale)` |
| `double`                    | `FLOAT`                       |
| `int`                       | `INTEGER`                     |
| `json`                      | `JSON`                        |
| `jsonarray`                 | `JSON`                        |
| `number`                    | `BIGNUMERIC`                  |
| `object{}`                  | `JSON`                        |
| `single`                    | `FLOAT`                       |
| `smallint`                  | `INTEGER`                     |
| `string`                    | `STRING`                      |
| `time`                      | `TIME`                        |


### Source types
|      GOOGLE BIGQUERY TYPE      |       POLYTOMIC TYPE        |
|--------------------------------|-----------------------------|
| `ARRAY<>`                      | `array<>`                   |
| `BIGNUMERIC`                   | `number`                    |
| `BIGNUMERIC(precision, scale)` | `decimal(precision, scale)` |
| `DATE`                         | `date`                      |
| `FLOAT`                        | `double`                    |
| `INTEGER`                      | `bigint`                    |
| `NUMERIC`                      | `number`                    |
| `NUMERIC(precision, scale)`    | `decimal(precision, scale)` |
| `RECORD`                       | `json`                      |
| `RECORD<>`                     | `object{}`                  |
| `TIME`                         | `time`                      |
| `TIMESTAMP`                    | `datetime`                  |