BigQuery adapter
The BigQuery warehouse adapter runs your SQL through the BigQuery REST API.
Fields
Section titled “Fields”| Field | Type | Required | Description |
|---|---|---|---|
project_id |
string | Yes | Google Cloud project ID that owns the datasets and is billed for query execution. |
location |
string | No | BigQuery processing location (e.g., "US", "EU", "us-central1"). Default "US". |
timeout_secs |
integer | No | Statement timeout in seconds. Default 300. |
[adapter.bq]type = "bigquery"project_id = "${GCP_PROJECT_ID}"location = "US"Authentication
Section titled “Authentication”Rocky reads BigQuery credentials from the environment, never from rocky.toml. It checks two variables in this order.
BIGQUERY_TOKEN— an OAuth bearer token you obtained yourself. Rocky uses it as is. Because Rocky checks it first, setting it overrides any service-account key on the same machine.GOOGLE_APPLICATION_CREDENTIALS— the path to a service-account JSON key. Rocky mints a JWT from the key, exchanges it for an access token at Google’s token endpoint, and refreshes the token before it expires.
If neither variable is set, the adapter fails with no authentication method available — set GOOGLE_APPLICATION_CREDENTIALS or provide a bearer token.
Load contracts and NUMERIC
Section titled “Load contracts and NUMERIC”BigQuery reports a default-precision decimal column by its bare name. rocky load checks a load contract against that report. On BigQuery it reads a bare NUMERIC as NUMERIC(38, 9), the documented default. A contract that declares NUMERIC(38,9) or wider passes. A narrower one, such as NUMERIC(10,2), fails with required_column_type.
A bare BIGNUMERIC is still refused with unverifiable_landed_type. Its default range has no exact (precision, scale) form. Other warehouses do not get this reading.
See also
Section titled “See also”[adapter.NAME]— fields shared by every adapter type, including the retry policy.