# gcp_bigquery_select

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

---
title: gcp_bigquery_select
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
latest-redpanda-tag: v26.1.9
docname: connect/components/processors/gcp_bigquery_select
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: connect/components/processors/gcp_bigquery_select.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/develop/pages/connect/components/processors/gcp_bigquery_select.adoc
page-git-created-date: "2024-09-09"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/develop/connect/components/processors/gcp_bigquery_select.md -->

**Type:** Processor ▼

[Processor](https://docs.redpanda.com/cloud-data-platform/develop/connect/components/processors/gcp_bigquery_select/)[Input](https://docs.redpanda.com/cloud-data-platform/develop/connect/components/inputs/gcp_bigquery_select/)

**Available in:** Cloud, [Self-Managed](https://docs.redpanda.com/connect/components/processors/gcp_bigquery_select/%20%22View%20the%20Self-Managed%20version%20of%20this%20component%22)

Executes a `SELECT` query against BigQuery and replaces messages with the rows returned.

```yml
# Config fields, showing default values
label: ""
gcp_bigquery_select:
  project: "" # No default (required)
  credentials_json: "" # No default (optional)
  table: bigquery-public-data.samples.shakespeare # No default (required)
  columns: [] # No default (required)
  where: type = ? and created_at > ? # No default (optional)
  job_labels: {}
  args_mapping: root = [ "article", now().ts_format("2006-01-02") ] # No default (optional)
  prefix: "" # No default (optional)
  suffix: "" # No default (optional)
```

## [](#examples)Examples

### [](#word-count)Word count

Given a stream of English terms, enrich the messages with the word count from Shakespeare’s public works:

```yaml
pipeline:
  processors:
    - branch:
        processors:
          - gcp_bigquery_select:
              project: test-project
              table: bigquery-public-data.samples.shakespeare
              columns:
                - word
                - sum(word_count) as total_count
              where: word = ?
              suffix: |
                GROUP BY word
                ORDER BY total_count DESC
                LIMIT 10
              args_mapping: root = [ this.term ]
        result_map: |
          root.count = this.get("0.total_count")
```

## [](#fields)Fields

### [](#args_mapping)`args_mapping`

An optional [Bloblang mapping](https://docs.redpanda.com/cloud-data-platform/develop/connect/guides/bloblang/about/) which should evaluate to an array of values matching in size to the number of placeholder arguments in the field `where`.

**Type**: `string`

```yaml
# Examples:
args_mapping: root = [ "article", now().ts_format("2006-01-02") ]
```

### [](#columns)`columns[]`

A list of columns to query.

**Type**: `array`

### [](#credentials_json)`credentials_json`

Base64-encoded Google Service Account credentials in JSON format (optional). Use this field to authenticate with Google Cloud services. For more information about creating service account credentials, see [Google’s service account documentation](https://developers.google.com/workspace/guides/create-credentials#create_credentials_for_a_service_account).

> ⚠️ **CAUTION**
>
> This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see [Manage Secrets](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/secret-management/) before adding it to your configuration.

**Type**: `string`

**Default**: `""`

### [](#job_labels)`job_labels`

A list of labels to add to the query job.

**Type**: `string`

**Default**: `{}`

### [](#prefix)`prefix`

An optional prefix to prepend to the select query (before SELECT).

**Type**: `string`

### [](#project)`project`

GCP project where the query job will execute.

**Type**: `string`

### [](#suffix)`suffix`

An optional suffix to append to the select query.

**Type**: `string`

### [](#table)`table`

Fully-qualified BigQuery table name to query.

**Type**: `string`

```yaml
# Examples:
table: bigquery-public-data.samples.shakespeare
```

### [](#where)`where`

An optional where clause to add. Placeholder arguments are populated with the `args_mapping` field. Placeholders should always be question marks (`?`).

**Type**: `string`

```yaml
# Examples:
where: type = ? and created_at > ?

# ---

where: user_id = ?
```