> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# BigQuery relation source

> Observe a BigQuery table through its built-in HTTPS query API.

Bind `bigQueryRelation(login)` to the SQL app's `provider` in the
[SQL mount example](https://docs.bijection.com/integrations/native-sql.md#mount-and-bind). Mount once per
source table. Rows and positions use the SQL mount’s label.

Seal the following receiver credential with `bijection secret set`. Use
a Google access token allowed to read the named table and its metadata and
to create and inspect query jobs in the billing project. Refresh the sealed
token before it expires.

```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "token": "<Google OAuth access token>",
  "path": ["data-project", "inventory", "items"],
  "key": [{"column": "region", "kind": "text"}, {"column": "id", "kind": "bigint"}],
  "columns": ["id", "name", "quantity"],
  "incarnation": "inventory-items-1",
  "settings": {
    "kind": "bigquery",
    "project": "billing-project",
    "location": "US",
    "maxBytesBilled": 104857600
  }
}
```

Declare one to eight required `INT64` or `STRING` key columns. Maintain
a unique, stable tuple at the source. Paging compares the full tuple,
with text ordered by UTF-8 bytes. Record keys are JSON arrays of strings
up to 512 encoded bytes. One query observes at most 32 rows per published page,
with a 24 KiB provider JSON row limit and 48 KiB encoded records per answer.
The connector checks table identity before and after the query, submits a
single billed-byte-limited GoogleSQL query per attempt, and reads only that
job's result from the fixed BigQuery origin. BigQuery attempts to cancel
jobs past their configured query timeout. A later poll may create a new job
if the earlier attempt has no published answer.

A whole traversal can observe concurrent changes. Later traversals refresh
keys they see and keep previously published keys that disappear. After a
restored or replaced source, set a new incarnation and authorize a reset at
the health revision and gap stamp.

## Write a declared relation

Follow the [parameterized SQL write guide](https://docs.bijection.com/integrations/native-sql.md#parameterized-sql-writes)
for the writer binding, composite and text keys, declared projection and
provider affected-row evidence.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.