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

# Google BigQuery

> Connect Google BigQuery tables and views as Liberator datasets

# Google BigQuery

BigQuery connections let Liberator read a table or view in Google BigQuery and expose it as a standard Liberator dataset. Queries, entitlements, and cache behave like other database sources.

> [!NOTE]
>
> BigQuery connectivity is available in Liberator **2.7** and later.

## Prerequisites

* A Google Cloud project that contains the dataset you want to query
* Permission to read that dataset, and permission to run query jobs in the billing project
* A service account JSON key for that access, unless your CloudQuant environment already runs in Google Cloud and uses the cluster identity
* **Admin** or **Super Admin** role in Liberator to create the connection and dataset

## Connect BigQuery

**1. Add a connection**

Go to **Connections → Add Connection** and select **Google BigQuery**.

**2. Identify the table**

Enter the Google Cloud project, the BigQuery dataset, and the table or view. Set the location when the dataset is not in the default region. Set a billing project when query jobs should bill a different project than the one that holds the data.

**3. Provide credentials**

Upload the service account JSON key. Liberator stores the key with the connection and does not display it again after save. On a Liberator environment that CloudQuant hosts in Google Cloud, you can use the cluster identity instead of a key file. Ask your CloudQuant account team which option your environment uses.

**4. Test connection**

Click **Test Connection**. On success, Liberator can list the table and sample rows.

**5. Onboard a dataset**

Create a dataset against the connection. Confirm the sampled columns, timestamp, and key fields. Liberator shows partition information when the table is partitioned, so you can choose date and key columns that query efficiently.

## What you can query

BigQuery-backed datasets use the same Liberator query parameters as other sources (`symbols` / key fields, `as_of`, `back_to`, and column selection). Partitioned tables discover partitions from the table's partition column, including `_PARTITIONDATE` and `_PARTITIONTIME` when those are how the table is partitioned.

Numeric, timestamp, date, boolean, and string columns map onto Liberator's usual column types. Nested JSON, structs, and arrays are sampled with the rest of the schema. Review them during onboarding and drop columns you do not want in the dataset.

## Tips

* Give the service account read access to the data project and job-user access on the billing project. Do not grant project owner.
* Prefer one Liberator dataset per table or view you query often.
* After you rotate the service account key, update the connection and run **Test Connection** before users query.
* Large tables benefit from [cache pre-generation](https://knowledge.cloudquant.com/administration/cache-pre-generation.md) so the first query does not scan BigQuery.

## Related

> [card] [Datasource overview](https://knowledge.cloudquant.com/datasource-config/overview.md)
>
> Connection and dataset architecture shared by every source

> [card] [What's new in 2.7](https://knowledge.cloudquant.com/whats-new/liberator-2.7.md)
>
> Liberator 2.7 release notes, including BigQuery

> [card] [Cache pre-generation](https://knowledge.cloudquant.com/administration/cache-pre-generation.md)
>
> Warm a BigQuery dataset before users query it

> [card] [Supported formats](https://knowledge.cloudquant.com/datasource-config/supported-formats.md)
>
> Database source categories and schema column types


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