<a id="cc-gcp-bigquery-source"></a>

# Google BigQuery Source (JDBC) Connector for Confluent Cloud

The fully managed Google BigQuery Source (JDBC) connector for Confluent Cloud reads
rows from BigQuery tables and streams them to Apache Kafka® topics, so that
downstream services can consume BigQuery data in real time without querying
BigQuery directly.

#### NOTE
The Google BigQuery Source (JDBC) connector for Confluent Cloud connects to
resources in the same region and cloud provider as your Confluent Cloud
cluster. If your Google BigQuery instance is in a different region or
cloud provider than your Confluent Cloud cluster, contact [Confluent Support](https://support.confluent.io/hc/en-us) to enable cross-region or
cross-cloud connectivity before you configure the connector.

## Features

The connector provides the following features:

* **Query modes**: Copies whole tables on each poll in bulk mode, or
  detects new or modified rows using an incrementing column, a timestamp
  column, or both.
* **Custom SQL query mode**: Runs a custom SQL query instead of copying
  whole tables, so that you can join tables or select a subset of columns.
* **High-throughput reads**: Optionally streams large result sets using the
  BigQuery Storage Read API instead of paged REST responses, based on
  configurable row and page thresholds.
* **Authentication methods**: Supports a Google Cloud service account key, or
  Google service account impersonation through a Confluent provider
  integration, which doesn’t require you to store service account keys. For
  more information, see [Manage a Google Cloud Provider Integration](provider-integration.md#connector-gcp-pi).
* **Output record value and key format**: Supports AVRO, JSON_SR (JSON
  Schema), PROTOBUF, and JSON (schemaless) output data formats for the
  record value, and AVRO, JSON_SR, PROTOBUF, JSON, or STRING for the record
  key. You must enable [Schema Registry](../get-started/schema-registry.md#cloud-sr-config) to use a
  Schema Registry-based format, such as AVRO, JSON_SR (JSON Schema), or PROTOBUF.
* **Client-side encryption (CSFLE) support**: The connector supports
  Client-Side Field Level Encryption (CSFLE) for sensitive data. For more information about CSFLE
  setup, see the [connector configuration](#cc-gcp-bigquery-source-setup-connection).
* **Typed nested schemas for STRUCT and ARRAY columns**: When reading from
  a table (not a custom query), the connector resolves `STRUCT` and
  `ARRAY` columns to typed nested Connect schemas by looking up the
  table’s real column definitions. For the conditions where this falls
  back to a JSON string instead, see the
  [connector limitations](limits.md#cc-gcp-bigquery-source-limits).
* **Broad type mapping**: Maps BigQuery `NUMERIC`, `DATE`, `DATETIME`,
  and `TIMESTAMP` types to Connect types, with configurable mapping
  behavior. The connector maps `GEOGRAPHY`, `JSON`, and `INTERVAL`
  columns to a string.

For more information and examples to use with the Confluent Cloud API for Connect,
see the [Confluent Cloud API for Connect Usage Examples](connect-api-section.md#ccloud-connect-api) section.

## Limitations

Be sure to review the following information.

* For connector limitations, see [Google BigQuery Source (JDBC) Connector](limits.md#cc-gcp-bigquery-source-limits) limitations.
* If you plan to use one or more Single Message Transformations (SMTs), see [SMT Limitations](single-message-transforms.md#cc-single-message-transforms-limitations).

## Quick Start

Use this quick start to get up and running with the Confluent Cloud Google BigQuery
JDBC Source connector. The quick start provides the basics of selecting the
connector and configuring it to stream rows from BigQuery tables into Kafka
topics.

<a id="cc-gcp-bigquery-source-prereqs"></a>

### Prerequisites

- Authorized access to a [Confluent Cloud](https://www.confluent.io/confluent-cloud/) cluster on Amazon Web Services (AWS), Microsoft Azure (Azure), or Google Cloud.
- The Confluent CLI installed and configured for the cluster. See [Install the Confluent CLI](https://docs.confluent.io/confluent-cli/current/install.html).
- You must enable [Schema Registry](../get-started/schema-registry.md#cloud-sr-config) to use a Schema Registry-based format, such as AVRO, JSON_SR (JSON Schema), or PROTOBUF.
- A BigQuery dataset that you want to read tables from.
- A Google Cloud service account with the BigQuery Job User role (`roles/bigquery.jobUser`) on the project that runs the queries, and the BigQuery Data Viewer role (`roles/bigquery.dataViewer`) on the target dataset. To use high-throughput reads, the service account also needs `bigquery.readsessions.create`, for example through `roles/bigquery.readSessionUser`. You can also use a Confluent provider integration for Google Cloud instead of a service account key.
- For networking considerations, see [Networking and DNS](overview.md#connect-internet-access-resources). To use a set of public egress IP addresses, see [Public Egress IP Addresses for Confluent Cloud Connectors](static-egress-ip.md#cc-static-egress-ips).

- Kafka cluster credentials. The following lists the different ways you can provide credentials.
  - Enter an existing [service account](service-account.md#s3-cloud-service-account) resource ID.
  - Create a Confluent Cloud [service account](service-account.md#s3-cloud-service-account) for the connector. Make sure to review the ACL entries required in the [service account documentation](service-account.md#s3-cloud-service-account). Some connectors have specific ACL requirements.
  - Create a Confluent Cloud API key and secret. To create a key and secret, you can use [confluent api-key create](https://docs.confluent.io/confluent-cli/current/command-reference/api-key/confluent_api-key_create.html) *or* you can autogenerate the API key and secret directly in the Cloud Console when setting up the connector.

### Using the Confluent Cloud Console

#### Step 1: Launch your Confluent Cloud cluster

To create and launch a Kafka cluster in Confluent Cloud, see [Create a kafka cluster in Confluent Cloud](../get-started/index.md#cloud-create-kafka-cluster).

#### Step 2: Add a connector

In the left navigation menu, click **Connectors**. If you already have connectors in your cluster, click **+ Add
connector**.

#### Step 3: Select your connector

Click the **Google BigQuery Source (JDBC)** connector card.

![Google BigQuery Source (JDBC) Connector Card](images/ccloud-gcp-bigquery-source-icon.png)

<a id="cc-gcp-bigquery-source-setup-connection"></a>

#### Step 4: Enter the connector details

Enter the connector details in each of the following tabs.

#### NOTE
* Ensure you have all your [prerequisites](#cc-gcp-bigquery-source-prereqs) completed.
* An asterisk ( \* ) designates a required entry.

At the **Add Google BigQuery Source (JDBC) Connector** screen, complete the
following:

### Kafka access

1. Select the way you want to provide **Kafka Cluster credentials**. You can
   choose one of the following options:
   - **My account**: This setting allows your connector to globally access everything
     that you have access to. With a user account, the connector uses an API key and
     secret to access the Kafka cluster. This option is not recommended for production.
   - **Service account**: This setting limits the access for your connector by using a
     [service account](service-account.md#s3-cloud-service-account). This option is recommended for
     production.
   - **Use an existing API key**: This setting allows you to specify an API key and a
     secret pair. You can use an existing pair or create a new one. This method is not
     recommended for production environments.

   #### NOTE
   Freight clusters support only service accounts for Kafka authentication.
2. Click **Continue**.

### Authentication

1. Configure the authentication properties:
   - **GCP credentials file**: GCP service account JSON file with read permissions for BigQuery.

   **GCP credentials**
   - **Authentication method**: Select how you want to authenticate with BigQuery.
   - **Provider Integration**: Select an existing provider integration that has access to your resource. To use a new Google service account, create a provider integration for it.

   **How should we connect to your BigQuery project?**
   - **BigQuery Project ID**: The ID of the GCP project containing the BigQuery dataset to read from.
   - **BigQuery Dataset**: The BigQuery dataset to read tables from.
2. Click **Continue**.

### Configuration

#### NOTE
Configuration properties that are not shown in the
Cloud Console use the default values. For all property values and
definitions, see [Configuration Properties](#cc-gcp-bigquery-source-config-properties).

- **Output Kafka record key format**: Sets the output Kafka record key format. Valid entries are AVRO, JSON_SR, PROTOBUF, STRING, or JSON. You must have Confluent Cloud Schema Registry configured if using a schema-based message format.

**Output messages**

- **Select output record value format**: Sets the output Kafka record value format. Valid entries are AVRO, JSON_SR, PROTOBUF, or JSON. You must have Confluent Cloud Schema Registry configured if using a schema-based message format.

**Connector Details**

- **Tables Included**: A comma-separated list of regular expressions that match the fully-qualified names of tables to copy, in the form `project.dataset.table`. For example, `my-project.my_dataset.orders,my-project.my_dataset.customer.*`. Only tables in the project and dataset selected above are considered. Identifier names are case sensitive. Not required if a Custom Query is provided. To copy every table in the dataset, set this to `.*`.
- **Tables Excluded**: A comma-separated list of regular expressions that match the fully-qualified names of tables not to copy, in the form `project.dataset.table`. This only applies to the tables filtered using the include list. Identifier names are case sensitive.
- **Mode**: The mode for updating a table each time it is polled. `bulk` performs a bulk load of the entire table on each poll. `timestamp` uses a timestamp (or timestamp-like) column to detect new and modified rows. `incrementing` uses a strictly incrementing column on each table to detect only new rows. `timestamp+incrementing` uses both a timestamp column and a strictly incrementing column.
- **Table to timestamp columns mappings**: A comma-separated list of fully-qualified table name to timestamp columns mappings. When you specify multiple timestamp columns, the connector uses the `COALESCE` SQL function to determine the effective timestamp for a row. Use the format `table1:[col1|col2],table2:[col3]`, where `table1`/`table2` can also be a pattern (regular expression) matched against the fully-qualified table names.
- **Table to incrementing column mappings**: A comma-separated list of fully-qualified table name to incrementing column mappings. Use the format `table1:col1,table2:col2`, where `table1`/`table2` can also be a pattern (regular expression) matched against the fully-qualified table names.
- **Custom Query**: If specified, the connector uses this custom SQL query instead of Tables Included and Tables Excluded to select rows, allowing joins or a subset of columns. Only SELECT statements are supported. In incremental modes, don’t include a WHERE, ORDER BY, or GROUP BY clause. The connector appends its own WHERE and ORDER BY clauses, which would conflict with them. STRUCT and ARRAY columns fall back to JSON strings in this mode, because the connector can’t resolve their nested schema without a table name.
- **Timestamp column name (custom query)**: Comma-separated timestamp column(s) used for incremental polling when a Custom Query is set. Use this instead of the table-to-timestamp mappings in custom query mode, since there is no table to match. When you specify multiple columns, the connector uses `COALESCE` to determine the effective timestamp.
- **Incrementing column name (custom query)**: Incrementing column used for incremental polling when a Custom Query is set. Use this instead of the table-to-incrementing mappings in custom query mode, since there is no table to match.
- **Table types**: By default, the connector detects only tables of type `TABLE`. This configuration accepts a comma-separated list of table types to extract.

### **Show advanced configurations**

- **Schema context**: Select a schema context to use for this connector, if using
  a schema-based data format. This property defaults to the **Default** context,
  which configures the connector to use the default schema set up for Schema Registry in your
  Confluent Cloud environment. A schema context allows you to use separate schemas (like
  schema sub-registries) tied to topics in different Kafka clusters that share the
  same Schema Registry environment. For example, if you select a non-default context, a
  **Source** connector uses only that schema context to register a schema and a
  **Sink** connector uses only that schema context to read from. For more
  information about setting up a schema context, see [What are schema contexts and when should you use them?](../sr/faqs-cc.md#faq-schema-contexts).

**Additional Configs**

- **Value Converter Replace Null With Default**: Specifies whether to replace fields that have a default value and that are null to the default value. When set to `true`, the connector uses the default value; otherwise, it uses `null`. Applies to the `JSON` converter.
- **Value Converter Reference Subject Name Strategy**: Sets the subject reference name strategy for values. Valid entries are `DefaultReferenceSubjectNameStrategy` or `QualifiedReferenceSubjectNameStrategy`. You can use this strategy only with `PROTOBUF` format; the default strategy is `DefaultReferenceSubjectNameStrategy`.
- **Value Converter Schemas Enable**: Includes schema within each of the serialized values. Input messages must contain `schema` and `payload` fields and must not contain additional fields. For plain `JSON` data, set this to `false`. Applies to the `JSON` converter.
- **Errors Tolerance**: Use this property to configure the connector’s error handling behavior.

  #### WARNING
  Use this property with caution for sink connectors, as it can lead to data loss. If you set this property to `all`, the connector does not fail on errant records, but logs them (and sends to DLQ for sink connectors) and continues processing. If you set this property to `none`, the connector task fails on errant records.
- **Value Converter Ignore Default For Nullables**: When set to `true`, this property ensures that the corresponding record in Kafka is `null`, instead of showing the default column value. Applies to the `AVRO`, `PROTOBUF`, and `JSON_SR` converters.
- **Value Converter Decimal Format**: Specifies the `JSON` or `JSON_SR` serialization format for Connect `DECIMAL` logical type values with two allowed literals:
  `BASE64` to serialize `DECIMAL` logical types as base64 encoded binary data, and
  `NUMERIC` to serialize `DECIMAL` logical type values in `JSON` or `JSON_SR` as a number representing the decimal value.
- **Key Converter Schema ID Serializer**: The class name of the schema ID serializer for keys. This is used to serialize schema IDs in the message headers.
- **Value Converter Connect Meta Data**: Enables the Connect converter to add its metadata to the output schema. Applies to Avro converters.
- **Value Converter Value Subject Name Strategy**: Determines how to construct the subject name under which the value schema is registered with Schema Registry.
- **Key Converter Key Subject Name Strategy**: Determines how to construct the subject name for key schema registration.
- **Value Converter Schema ID Serializer**: The class name of the schema ID serializer for values. This is used to serialize schema IDs in the message headers.

**Auto-restart policy**

- **Enable Connector Auto-restart**: Enables the auto-restart behavior of the connector and its
  task in the event of user-actionable errors. Defaults to `true`, enabling the connector to
  automatically restart in case of user-actionable errors. Set this property to `false` to
  disable auto-restart for failed connectors. If disabled, you must manually restart the connector.

**Connector Details**

- **Timestamp granularity for timestamp columns**: Define the granularity of the timestamp column. `CONNECT_LOGICAL` (default) represents timestamp values using Kafka Connect built-in representations.
- **Numeric Mapping**: Maps `NUMERIC` values to integral or decimal types by precision and, optionally, scale. Use `none` to represent all `NUMERIC` columns using Connect’s `DECIMAL` logical type.
- **Database timezone**: Name of the JDBC timezone the connector uses when querying with time-based criteria. Defaults to `UTC`.
- **Transaction Isolation Level**: Isolation level determines how transaction integrity is visible to other users and systems.
- **Initial timestamp**: The epoch timestamp used for initial queries that use timestamp criteria. Set to `-1` to use the current time as the initial timestamp. If not specified, the connector retrieves all data.
- **Delay interval (ms)**: How long to wait after a row with a certain timestamp appears before including it in the result.
- **Date Calendar System**: Which calendar system to use when interpreting `DATE` or `TIMESTAMP` columns. `LEGACY` (default) matches historical behavior. `PROLEPTIC_GREGORIAN` matches modern java.time semantics.
- **Poll interval (ms)**: Set the time in milliseconds to wait for new change events when no data is returned. Default is `500` ms.
- **Max rows per batch**: Maximum number of rows to include in a single batch when polling for new data.

**Database details**

- **Enable High-Throughput Reads**: Streams large result sets using the BigQuery Storage Read API instead of paged REST responses. Requires the service account to have the `bigquery.readsessions.create` permission, for example `roles/bigquery.readSessionUser`.
- **High-Throughput Activation Ratio**: The number of result pages a query result must exceed before the driver switches from the standard REST API to the faster Storage Read API. The result must also exceed `bigquery.high.throughput.min.table.size` rows. Only applies when `bigquery.high.throughput.enabled` is `true`.
- **High-Throughput Min Table Size**: The minimum number of rows a query result must exceed before the driver switches from the standard REST API to the Storage Read API. The result must also exceed the High-Throughput Activation Ratio page threshold. Only applies when `bigquery.high.throughput.enabled` is `true`.
- **Query Location**: The location where BigQuery runs query jobs. BigQuery determines this automatically if you leave it blank.
- **Query Labels**: Labels attached to query jobs for cost attribution, as a comma-separated list of `key=value` pairs, for example `team=data-eng,env=prod`. None by default.
- **Use Query Cache**: Whether to allow BigQuery to serve query results from its cache. Enabled by default.
- **Job Timeout (seconds)**: Seconds after which the server cancels a query job. `0` (default) means no timeout.
- **Job Creation Mode**: Controls whether BigQuery runs each poll as a tracked query job. A query job has a job ID, appears in BigQuery job history with full statistics, and can be monitored or cancelled. `1` (`JOB_CREATION_REQUIRED`) always creates a job; choose this when you need per-query auditing, monitoring, or job history. `2` (`JOB_CREATION_OPTIONAL`, default) lets BigQuery skip job creation for short, fast queries and return results directly, which lowers latency and overhead for frequent small polls (BigQuery still creates a job for queries that are not eligible). Use `2` for typical high-frequency polling where per-query job tracking is not needed.
- **DATETIME Mapping**: How the connector maps BigQuery `DATETIME` columns. `string` (the default) maps them to a string. Because `DATETIME` has no timezone, this avoids implying one. `timestamp` maps them to the Connect `Timestamp` logical type, reading the naive value as UTC at millisecond precision, regardless of the worker timezone or the configured `db.timezone`.
- **Maximum Bytes Billed**: Maximum bytes a query job can bill before BigQuery cancels it without charging. `0` (default) leaves this unset, so the connector applies no per-query cap.
- **Query Retry Attempts**: Number of times to retry a query after a retryable SQL error (for example a timed-out job) before failing the task. Defaults to `10`. A bounded value stops an expensive or repeatedly failing query from being retried indefinitely and silently accruing BigQuery cost. `-1` retries without limit (not recommended).

**Transforms**

- **Single Message Transformations**: To add a new SMT, see [Add transforms](single-message-transforms.md#cc-single-message-transforms-ui).
  For more information about unsupported SMTs, see
  [Unsupported transformations](single-message-transforms.md#cc-single-message-transforms-unsupported-transforms).

**Data encryption**

- Enable **Client-Side Field Level Encryption**
  for data encryption. Specify a **Service Account** to
  access the Schema Registry and associated encryption rules or keys with that schema. For more
  information on CSFLE or CSPE setup,
  see [Manage encryption for connectors](csfle.md#connect-csfle).

For all property values and definitions, see [Configuration Properties](#cc-gcp-bigquery-source-config-properties).

- Click **Continue**.

### Sizing

Based on the number of topic partitions you select, the connector
recommends a number of tasks.

1. To change the number of recommended tasks, enter the number of
   [tasks](/platform/current/connect/concepts.html#tasks) for the connector to use in
   the **Tasks** field.
2. Click **Continue**.

### Review and launch

1. Verify the connection details.
2. Click **Launch**.

   The status for the connector should go from **Provisioning** to
   **Running**.

#### Step 5: Check the Kafka topic

After the connector is running, verify that records from your BigQuery
tables are populating the Kafka topic.

For more information and examples to use with the Confluent Cloud API for Connect,
see the [Confluent Cloud API for Connect Usage Examples](connect-api-section.md#ccloud-connect-api) section.

### Using the Confluent CLI

Complete the following steps to set up and run the connector using the
Confluent CLI.

#### NOTE
Make sure you have all your [prerequisites](#cc-gcp-bigquery-source-prereqs) completed.

#### Step 1: List the available connectors

Enter the following command to list available connectors:

```none
confluent connect plugin list
```

#### Step 2: List the connector configuration properties

Enter the following command to show the connector configuration properties:

```none
confluent connect plugin describe <connector-plugin-name>
```

The command output shows the required and optional configuration properties.

#### Step 3: Create the connector configuration file

Create a JSON file that contains the connector configuration properties. The
following example shows required and optional connector properties.

```none
{
  "name": "BigQuerySource_0",
  "config": {
    "topic.prefix": "bigquery_",
    "connector.class": "BigQuerySource",
    "name": "BigQuerySource_0",
    "output.data.format": "AVRO",
    "output.key.format": "STRING",
    "kafka.auth.mode": "KAFKA_API_KEY",
    "kafka.api.key": "<my-kafka-api-key>",
    "kafka.api.secret": "<my-kafka-api-secret>",
    "authentication.method": "Google cloud service account",
    "bigquery.credentials.json": "<my-gcp-service-account-json>",
    "catalog.pattern": "<gcp-project-id>",
    "schema.pattern": "<bigquery-dataset>",
    "table.include.list": ".*",
    "mode": "bulk",
    "tasks.max": "1"
  }
}
```

Note the following property definitions:

* `"name"`: Sets a name for your new connector.
* `"connector.class"`: Identifies the connector plugin name.
* `"topic.prefix"`: Prefix to prepend to table names to generate the name
  of the Kafka topic to publish data to. When you use a custom query, the
  connector uses this value as the full topic name.
* `"output.data.format"`: Sets the output Kafka record value format. Valid
  entries are AVRO, JSON_SR, PROTOBUF, or JSON. You must have Confluent Cloud Schema Registry
  configured if using a schema-based message format like AVRO, JSON_SR, and
  PROTOBUF.
* `"output.key.format"`: Sets the output Kafka record key format. Valid
  entries are AVRO, JSON_SR, PROTOBUF, JSON, or STRING (default). You must
  have Confluent Cloud Schema Registry configured if using a schema-based message format like
  AVRO, JSON_SR, and PROTOBUF.

* `"kafka.auth.mode"`: Identifies the connector authentication mode you want to use. There are two options: `SERVICE_ACCOUNT` or `KAFKA_API_KEY` (the default). To use an API key and secret, specify the configuration properties `kafka.api.key` and `kafka.api.secret`, as shown in the example configuration (above).  To use a [service account](service-account.md#s3-cloud-service-account), specify the **Resource ID** in the property `kafka.service.account.id=<service-account-resource-ID>`. To list the available service account resource IDs, use the following command:
  ```bash
  confluent iam service-account list
  ```

  For example:
  ```bash
  confluent iam service-account list

     Id     | Resource ID |       Name        |    Description
  +---------+-------------+-------------------+-------------------
     123456 | sa-l1r23m   | sa-1              | Service account 1
     789101 | sa-l4d56p   | sa-2              | Service account 2
  ```

* `"authentication.method"`: How the connector authenticates to BigQuery.
  Valid entries are `Google cloud service account` (default) and
  `Google service account impersonation`.
* `"bigquery.credentials.json"`: The contents of the downloaded Google Cloud
  service account JSON key file, as an escaped JSON string (not a file
  path). The service account must have read permissions for BigQuery.
  Required when `"authentication.method"` is set to
  `Google cloud service account`.
* `"provider.integration.id"`: The ID of your Google Cloud provider integration.
  Required when `"authentication.method"` is set to
  `Google service account impersonation`. For setup, see
  [Manage a Google Cloud Provider Integration](provider-integration.md#connector-gcp-pi).
* `"catalog.pattern"`: The ID of the GCP project containing the BigQuery
  dataset to read from.
* `"schema.pattern"`: The BigQuery dataset to read tables from.
* `"table.include.list"`: A comma-separated list of regular expressions
  that match the fully qualified names of tables to copy, in the form
  `project.dataset.table`. To copy every table in the dataset, set this
  to `.*`.
* `"mode"`: The mode for updating a table on each poll. Valid
  entries are `bulk` (default), `timestamp`, `incrementing`, and
  `timestamp+incrementing`.
* `"tasks.max"`: Enter the number of [tasks](/platform/current/connect/concepts.html#tasks)
  for the connector to use.

#### NOTE
To enable CSFLE or CSPE for data encryption, specify the following properties:

* `csfle.enabled`: Flag to indicate whether the connector honors CSFLE or CSPE rules.
* `sr.service.account.id`: A Service Account to access the Schema Registry and associated encryption rules or keys with that schema.

For more information on CSFLE or CSPE setup, see [Manage encryption for connectors](csfle.md#connect-csfle).

**SMTs**: For more information about adding SMTs using the Confluent CLI,
see [Single Message Transformations](single-message-transforms.md#cc-single-message-transforms).

For all property values and descriptions, see
[Configuration Properties](#cc-gcp-bigquery-source-config-properties).

#### Step 4: Load the configuration file and create the connector

Enter the following command to load the configuration and start the connector:

```none
confluent connect cluster create --config-file <file-name>.json
```

For example:

```none
confluent connect cluster create --config-file gcp-bigquery-source-config.json
```

Example output:

```none
Created connector BigQuerySource_0 lcc-ix4dl
```

#### Step 5: Check the connector status

Enter the following command to check the connector status:

```none
confluent connect cluster list
```

Example output:

```none
ID          |          Name         | Status  | Type
+-----------+-----------------------+---------+--------+
lcc-ix4dl   | BigQuerySource_0      | RUNNING | source
```

#### Step 6: Check the Kafka topic

After the connector is running, verify that records from your BigQuery
tables are populating the Kafka topic.

For more information and examples to use with the Confluent Cloud API for Connect,
see the [Confluent Cloud API for Connect Usage Examples](connect-api-section.md#ccloud-connect-api) section.

<a id="cc-gcp-bigquery-source-config-properties"></a>

## Configuration Properties

Use the following configuration properties with the fully managed connector.
For self-managed connector property definitions and other details, see the
connector docs in [Self-managed connectors for Confluent
Platform](/platform/current/connect/kafka_connectors.html).

### How should we connect to your data?

`name`
: Sets a name for your connector.
  <br/>
  * Type: string
  * Valid Values: A string at most 64 characters long
  * Importance: high

### Kafka Cluster credentials

`kafka.auth.mode`
: Kafka Authentication mode. It can be one of KAFKA_API_KEY or SERVICE_ACCOUNT. It defaults to KAFKA_API_KEY mode, whenever possible.
  <br/>
  * Type: string
  * Valid Values: SERVICE_ACCOUNT, KAFKA_API_KEY
  * Importance: high

`kafka.api.key`
: Kafka API Key. Required when kafka.auth.mode==KAFKA_API_KEY.
  <br/>
  * Type: password
  * Importance: high

`kafka.service.account.id`
: The Service Account that will be used to generate the API keys to communicate with Kafka Cluster.
  <br/>
  * Type: string
  * Importance: high

`kafka.api.secret`
: Secret associated with Kafka API key. Required when kafka.auth.mode==KAFKA_API_KEY.
  <br/>
  * Type: password
  * Importance: high

### Schema Config

`schema.context.name`
: Add a schema context name. A schema context represents an independent scope in Schema Registry. It is a separate sub-schema tied to topics in different Kafka clusters that share the same Schema Registry instance. If not used, the connector uses the default schema configured for Schema Registry in your Confluent Cloud environment.
  <br/>
  * Type: string
  * Default: default
  * Importance: medium

### How do you want to prefix table names?

`topic.prefix`
: Prefix to prepend to table names to generate the name of the Apache Kafka® topic to publish data to.
  <br/>
  * Type: string
  * Importance: high

### How should we configure the topic(s)?

`topic.creation.topic_prefix_match.partitions`
: Number of partitions for Kafka topics auto-created by the connector for topics whose name starts with `topic.prefix`. Kafka preserves message ordering only within a partition. Records without a key are distributed across all partitions, so any value above 1 removes ordering guarantees for them. Keep this at 1 (the default) if you need all records in a topic delivered in strict order.
  <br/>
  * Type: int
  * Default: 1
  * Valid Values: [1,…]
  * Importance: high

`topic.creation.topic_prefix_match.cleanup.policy`
: Cleanup policy applied to Kafka topics auto-created by the connector for topics whose name starts with `topic.prefix`. `delete` ages records out based on retention settings; `compact` retains only the latest value per key and requires every record to have a non-null key.
  <br/>
  * Type: string
  * Default: delete
  * Valid Values: compact, compact,delete, delete
  * Importance: high

### Storage

`topic.creation.topic_prefix_match.retention.ms`
: Time-based retention, in milliseconds, applied to Kafka topics auto-created by the connector for topics whose name starts with `topic.prefix`. Use `-1` for infinite retention.
  <br/>
  * Type: long
  * Default: 604800000 (7 days)
  * Valid Values: [-1,…]
  * Importance: high

`topic.creation.topic_prefix_match.retention.bytes`
: Size-based retention, in bytes, applied to Kafka topics auto-created by the connector for topics whose name starts with `topic.prefix`. Use `-1` for unlimited size.
  <br/>
  * Type: long
  * Default: -1
  * Valid Values: [-1,…]
  * Importance: high

### GCP credentials

`provider.integration.id`
: Select an existing integration that has access to your resource. In case you need to integrate a new Google Service Account, use provider integration
  <br/>
  * Type: string
  * Importance: high

`authentication.method`
: Select how you want to authenticate with BigQuery.
  <br/>
  * Type: string
  * Default: Google cloud service account
  * Valid Values: Google cloud service account, Google service account impersonation
  * Importance: high

`bigquery.credentials.json`
: GCP service account JSON file with read permissions for BigQuery.
  <br/>
  * Type: password
  * Importance: high

### How should we connect to your BigQuery project?

`catalog.pattern`
: The ID of the GCP project containing the BigQuery dataset to read from.
  <br/>
  * Type: string
  * Importance: high

`schema.pattern`
: The BigQuery dataset to read tables from.
  <br/>
  * Type: string
  * Importance: high

### Connector Details

`table.include.list`
: A comma-separated list of regular expressions that match the fully-qualified names of tables to copy, in the form `project.dataset.table`. For example, `my-project.my_dataset.orders,my-project.my_dataset.customer.*`. Only tables in the project and dataset selected above are considered. Table names are case sensitive. Not required if a custom Query Config is provided instead. To copy every table in the dataset, set this to `.*` explicitly.
  <br/>
  * Type: list
  * Importance: medium

`table.exclude.list`
: A comma-separated list of regular expressions that match the fully-qualified names of tables not to copy, in the form `project.dataset.table`. For example, `my-project.my_dataset.orders_archive,my-project.my_dataset.tmp_.*`. This only applies to the tables filtered using the include list. Table names are case sensitive.
  <br/>
  * Type: list
  * Importance: medium

`mode`
: The mode for updating a table each time it is polled. `bulk` performs a bulk load of the entire table on each poll. `timestamp` uses a timestamp (or timestamp-like) column to detect new and modified rows. `incrementing` uses a strictly incrementing column on each table to detect only new rows. `timestamp+incrementing` uses both a timestamp column and a strictly incrementing column.
  <br/>
  * Type: string
  * Default: bulk
  * Importance: medium

`timestamp.columns.mapping`
: A comma-separated list of fully-qualified table name to timestamp columns mappings. When you specify multiple timestamp columns, the connector uses the `COALESCE` SQL function to determine the effective timestamp for a row. Use the format `table1:[col1|col2],table2:[col3]`, where table1/table2 can also be a pattern (regular expression) matched against the fully-qualified table names.
  <br/>
  * Type: list
  * Importance: medium

`incrementing.column.mapping`
: A comma-separated list of fully-qualified table name to incrementing column mappings. Use the format `table1:col1,table2:col2`, where table1/table2 can also be a pattern (regular expression) matched against the fully-qualified table names.
  <br/>
  * Type: list
  * Importance: medium

`query`
: If specified, the connector uses this custom SQL query instead of Tables Included/Tables Excluded to select rows, allowing joins or a subset of columns. Only SELECT statements are supported; don’t add a WHERE/ORDER BY/GROUP BY clause in incremental modes, since the connector appends those itself. STRUCT/ARRAY columns fall back to JSON strings in this mode, since their real nested schema can’t be resolved without a table name.
  <br/>
  * Type: password
  * Default: [hidden]
  * Importance: medium

`timestamp.column.name`
: Comma-separated timestamp column(s) used for incremental polling when a Custom Query is set. Use this instead of the table-to-timestamp mappings in custom query mode, since there is no table to match. When you specify multiple columns, the connector uses `COALESCE` to determine the effective timestamp.
  <br/>
  * Type: list
  * Importance: medium

`incrementing.column.name`
: Incrementing column used for incremental polling when a Custom Query is set. Use this instead of the table-to-incrementing mappings in custom query mode, since there is no table to match.
  <br/>
  * Type: string
  * Importance: medium

`timestamp.granularity`
: Define the granularity of the timestamp column. `CONNECT_LOGICAL` (default) represents timestamp values using Kafka Connect built-in representations.
  <br/>
  * Type: string
  * Default: CONNECT_LOGICAL
  * Importance: low

`numeric.mapping`
: Maps `NUMERIC` values to integral or decimal types by precision and, optionally, scale. Use `none` to represent all `NUMERIC` columns using Connect’s `DECIMAL` logical type.
  <br/>
  * Type: string
  * Default: none
  * Importance: low

`db.timezone`
: Name of the JDBC timezone the connector uses when querying with time-based criteria. Defaults to `UTC`.
  <br/>
  * Type: string
  * Default: UTC
  * Importance: medium

`transaction.isolation.mode`
: Isolation level determines how transaction integrity is visible to other users and systems.
  <br/>
  * Type: string
  * Default: DEFAULT
  * Valid Values: DEFAULT, READ_COMMITTED, READ_UNCOMMITTED, REPEATABLE_READ, SERIALIZABLE
  * Importance: medium

`timestamp.initial`
: The epoch timestamp used for initial queries that use timestamp criteria. Set to `-1` to use the current time as the initial timestamp. If not specified, the connector retrieves all data.
  <br/>
  * Type: long
  * Valid Values: [-1,…]
  * Importance: medium

`timestamp.delay.interval.ms`
: How long to wait after a row with a certain timestamp appears before including it in the result.
  <br/>
  * Type: int
  * Default: 0
  * Valid Values: [0,…]
  * Importance: high

`date.calendar.system`
: Which calendar system to use when interpreting `DATE` or `TIMESTAMP` columns. `LEGACY` (default) matches historical behavior. `PROLEPTIC_GREGORIAN` matches modern java.time semantics.
  <br/>
  * Type: string
  * Default: LEGACY
  * Importance: medium

`poll.interval.ms`
: Frequency in ms to poll for new data in each table.
  <br/>
  * Type: int
  * Default: 5000 (5 seconds)
  * Valid Values: [100,…]
  * Importance: high

`batch.max.rows`
: Maximum number of rows to include in a single batch when polling for new data.
  <br/>
  * Type: int
  * Default: 100
  * Valid Values: [1,…,5000]
  * Importance: low

`table.types`
: By default, the connector detects only tables of type `TABLE`. This configuration accepts a comma-separated list of table types to extract.
  <br/>
  * Type: list
  * Default: TABLE
  * Importance: medium

### Database details

`bigquery.high.throughput.enabled`
: Streams large result sets using the BigQuery Storage Read API instead of paged REST responses. Requires the service account to have the `bigquery.readsessions.create` permission, for example `roles/bigquery.readSessionUser`.
  <br/>
  * Type: boolean
  * Default: false
  * Importance: medium

`bigquery.high.throughput.activation.ratio`
: The driver’s `HighThroughputActivationRatio` is a result-page count, not a ratio. The driver switches from the standard REST API to the faster Storage Read API only when a query’s result spans more than this many pages and also has more than `bigquery.high.throughput.min.table.size` rows. Only applies when `bigquery.high.throughput.enabled` is `true`.
  <br/>
  * Type: int
  * Default: 2
  * Importance: low

`bigquery.high.throughput.min.table.size`
: Row count above which the driver switches from REST to the Storage Read API. Only applies when `bigquery.high.throughput.enabled` is `true`.
  <br/>
  * Type: int
  * Default: 10000
  * Importance: low

`bigquery.query.location`
: The location where BigQuery runs query jobs. BigQuery determines this automatically if you leave it blank.
  <br/>
  * Type: string
  * Default: “”
  * Importance: low

`bigquery.query.labels`
: Labels attached to query jobs for cost attribution, as a comma-separated list of `key=value` pairs, for example `team=data-eng,env=prod`. None by default.
  <br/>
  * Type: string
  * Default: “”
  * Importance: low

`bigquery.query.use.cache`
: Whether to allow BigQuery to serve query results from its cache. Enabled by default.
  <br/>
  * Type: boolean
  * Default: true
  * Importance: low

`bigquery.query.job.timeout.seconds`
: Seconds after which the server cancels a query job. `0` (default) means no timeout.
  <br/>
  * Type: int
  * Default: 0
  * Importance: low

`bigquery.query.job.creation.mode`
: Controls whether BigQuery runs each poll as a tracked query job. A query job has a job ID, appears in BigQuery job history with full statistics, and can be monitored or cancelled. `1` (`JOB_CREATION_REQUIRED`) always creates a job; choose this when you need per-query auditing, monitoring, or job history. `2` (`JOB_CREATION_OPTIONAL`, default) lets BigQuery skip job creation for short, fast queries and return results directly, which lowers latency and overhead for frequent small polls (BigQuery still creates a job for queries that are not eligible). Use `2` for typical high-frequency polling where per-query job tracking is not needed.
  <br/>
  * Type: int
  * Default: 2
  * Importance: low

`bigquery.datetime.mapping`
: How the connector maps BigQuery `DATETIME` columns. `string` (the default) maps them to a string. Because `DATETIME` has no timezone, this avoids implying one. `timestamp` maps them to the Connect `Timestamp` logical type, reading the naive value as UTC (independent of worker timezone) at millisecond precision.
  <br/>
  * Type: string
  * Default: string
  * Importance: low

`bigquery.query.maximum.bytes.billed`
: Maximum bytes a query job can bill before BigQuery cancels it without charging. `0` (default) leaves this unset, so the connector applies no per-query cap.
  <br/>
  * Type: long
  * Default: 0
  * Valid Values: [0,…]
  * Importance: low

`query.retry.attempts`
: Number of times to retry a query after a retryable SQL error (for example a timed-out job) before failing the task. Defaults to `10`. A bounded value stops an expensive or repeatedly failing query from being retried indefinitely and silently accruing BigQuery cost. `-1` retries without limit (not recommended).
  <br/>
  * Type: int
  * Default: 10
  * Valid Values: [-1,…]
  * Importance: low

### Output messages

`output.data.format`
: Sets the output Kafka record value format. Valid entries are AVRO, JSON_SR, PROTOBUF, or JSON. Note that you need to have Confluent Cloud Schema Registry configured if using a schema-based message format like AVRO, JSON_SR, and PROTOBUF
  <br/>
  * Type: string
  * Default: JSON
  * Importance: high

`output.key.format`
: Sets the output Kafka record key format. Valid entries are AVRO, JSON_SR, PROTOBUF, STRING or JSON. Note that you need to have Confluent Cloud Schema Registry configured if using a schema-based message format like AVRO, JSON_SR, and PROTOBUF
  <br/>
  * Type: string
  * Default: STRING
  * Valid Values: AVRO, JSON, JSON_SR, PROTOBUF, STRING
  * Importance: high

### Number of tasks for this connector

`tasks.max`
: Maximum number of tasks for the connector.
  <br/>
  * Type: int
  * Valid Values: [1,…]
  * Importance: high

### Additional Configs

`header.converter`
: The converter class for the headers. This is used to serialize and deserialize the headers of the messages.
  <br/>
  * Type: string
  * Importance: low

`producer.override.compression.type`
: The compression type for all data generated by the producer. Valid values are none, gzip, snappy, lz4, and zstd.
  <br/>
  * Type: string
  * Importance: low

`producer.override.linger.ms`
: The producer groups together any records that arrive in between request transmissions into a single batched request. More details can be found in the documentation: [https://docs.confluent.io/platform/current/installation/configuration/producer-configs.html#linger-ms](https://docs.confluent.io/platform/current/installation/configuration/producer-configs.html#linger-ms).
  <br/>
  * Type: long
  * Valid Values: [100,…,1000]
  * Importance: low

`value.converter.allow.optional.map.keys`
: Allow optional string map key when converting from Connect Schema to Avro Schema. Applicable for Avro Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.auto.register.schemas`
: Specify if the Serializer should attempt to register the Schema.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.connect.meta.data`
: Allow the Connect converter to add its metadata to the output schema. Applicable for Avro Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.enhanced.avro.schema.support`
: Enable enhanced schema support to preserve package information and Enums. Applicable for Avro Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.enhanced.protobuf.schema.support`
: Enable enhanced schema support to preserve package information. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.flatten.unions`
: Whether to flatten unions (oneofs). Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.generate.index.for.unions`
: Whether to generate an index suffix for unions. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.generate.struct.for.nulls`
: Whether to generate a struct variable for null values. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.int.for.enums`
: Whether to represent enums as integers. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.latest.compatibility.strict`
: Verify latest subject version is backward compatible when use.latest.version is true.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.object.additional.properties`
: Whether to allow additional properties for object schemas. Applicable for JSON_SR Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.optional.for.nullables`
: Whether nullable fields should be specified with an optional label. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.optional.for.proto2`
: Whether proto2 optionals are supported. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.scrub.invalid.names`
: Whether to scrub invalid names by replacing invalid characters with valid characters. Applicable for Avro and Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.use.latest.version`
: Use latest version of schema in subject for serialization when auto.register.schemas is false.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.use.optional.for.nonrequired`
: Whether to set non-required properties to be optional. Applicable for JSON_SR Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.wrapper.for.nullables`
: Whether nullable fields should use primitive wrapper messages. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.wrapper.for.raw.primitives`
: Whether a wrapper message should be interpreted as a raw primitive at root level. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`errors.tolerance`
: Use this property if you would like to configure the connector’s error handling behavior. WARNING: This property should be used with CAUTION for SOURCE CONNECTORS as it may lead to dataloss. If you set this property to ‘all’, the connector will not fail on errant records, but will instead log them (and send to DLQ for Sink Connectors) and continue processing. If you set this property to ‘none’, the connector task will fail on errant records.
  <br/>
  * Type: string
  * Default: none
  * Importance: low

`key.converter.key.schema.id.serializer`
: The class name of the schema ID serializer for keys. This is used to serialize schema IDs in the message headers.
  <br/>
  * Type: string
  * Default: io.confluent.kafka.serializers.schema.id.PrefixSchemaIdSerializer
  * Importance: low

`key.converter.key.subject.name.strategy`
: How to construct the subject name for key schema registration.
  <br/>
  * Type: string
  * Default: TopicNameStrategy
  * Importance: low

`key.converter.replace.null.with.default`
: Whether to replace fields that have a default value and that are null to the default value. When set to true, the default value is used, otherwise null is used. Applicable for JSON Key Converter.
  <br/>
  * Type: boolean
  * Default: true
  * Importance: low

`key.converter.schemas.enable`
: Include schemas within each of the serialized keys. Input message keys must contain schema and payload fields and may not contain additional fields. For plain JSON data, set this to false. Applicable for JSON Key Converter.
  <br/>
  * Type: boolean
  * Default: false
  * Importance: low

`value.converter.decimal.format`
: Specify the JSON/JSON_SR serialization format for Connect DECIMAL logical type values with two allowed literals:
  <br/>
  BASE64 to serialize DECIMAL logical types as base64 encoded binary data and
  <br/>
  NUMERIC to serialize Connect DECIMAL logical type values in JSON/JSON_SR as a number representing the decimal value.
  <br/>
  * Type: string
  * Default: BASE64
  * Importance: low

`value.converter.flatten.singleton.unions`
: Whether to flatten singleton unions. Applicable for Avro and JSON_SR Converters.
  <br/>
  * Type: boolean
  * Default: false
  * Importance: low

`value.converter.ignore.default.for.nullables`
: When set to true, this property ensures that the corresponding record in Kafka is NULL, instead of showing the default column value. Applicable for AVRO,PROTOBUF and JSON_SR Converters.
  <br/>
  * Type: boolean
  * Default: false
  * Importance: low

`value.converter.reference.subject.name.strategy`
: Set the subject reference name strategy for value. Valid entries are DefaultReferenceSubjectNameStrategy or QualifiedReferenceSubjectNameStrategy. Note that the subject reference name strategy can be selected only for PROTOBUF format with the default strategy being DefaultReferenceSubjectNameStrategy.
  <br/>
  * Type: string
  * Default: DefaultReferenceSubjectNameStrategy
  * Importance: low

`value.converter.replace.null.with.default`
: Whether to replace fields that have a default value and that are null to the default value. When set to true, the default value is used, otherwise null is used. Applicable for JSON Converter.
  <br/>
  * Type: boolean
  * Default: true
  * Importance: low

`value.converter.schemas.enable`
: Include schemas within each of the serialized values. Input messages must contain schema and payload fields and may not contain additional fields. For plain JSON data, set this to false. Applicable for JSON Converter.
  <br/>
  * Type: boolean
  * Default: false
  * Importance: low

`value.converter.value.schema.id.serializer`
: The class name of the schema ID serializer for values. This is used to serialize schema IDs in the message headers.
  <br/>
  * Type: string
  * Default: io.confluent.kafka.serializers.schema.id.PrefixSchemaIdSerializer
  * Importance: low

`value.converter.value.subject.name.strategy`
: Determines how to construct the subject name under which the value schema is registered with Schema Registry.
  <br/>
  * Type: string
  * Default: TopicNameStrategy
  * Importance: low

### Auto-restart policy

`auto.restart.on.user.error`
: Enable connector to automatically restart on user-actionable errors.
  <br/>
  * Type: boolean
  * Default: true
  * Importance: medium

## Next Steps

For an example that shows fully managed Confluent Cloud connectors in action with
Confluent Cloud for Apache Flink, see the [Cloud ETL Demo](/platform/current/tutorials/examples/cloud-etl/docs/index.html).
This example also shows how to use Confluent CLI to manage your resources in
Confluent Cloud.

[![image](images/topology.png)](https://docs.confluent.io/platform/current/tutorials/examples/cloud-etl/docs/index.html)
