Dagweave catalog

Run a BigQuery query

bigquery-queryv1.0.4updated 2026-08-205 versions

Run a Standard SQL query against BigQuery with the bq CLI, using a GCP service-account key read from a Kubernetes Secret.

Install v1.0.4

Installs the template into your Argo namespace. The URL is pinned to this version.

kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/bigquery-query/1.0.4/template.yaml

Or with the Argo CLI:

argo template create -n argo https://catalog.dagweave.com/api/v1/items/bigquery-query/1.0.4/template.yaml

Facts

Category
Databases
Tags
cloud-sdk databases
Entrypoint
query
Template SHA-256
2e7343f0baf741d83099c998ecb4971593db972d85729f7d97ec578b50e1e2d7
Source
bigquery-query at catalog commit 67458f7
API
item document, latest template.yaml

Images and provenance

Every image is pinned by digest, so a rebuilt tag can never change what this version runs.

RepositoryTagDigest
google/cloud-sdknone recordedsha256:b38f2881552c3054d140c8eeb4ad88bdc0eb4deeeb38507c5dac1403adc3ee64

Parameters

NameDescriptionDefault
project required GCP project to bill the query to.
Example my-gcp-project
none
query required The Standard SQL query to run.
Example SELECT count(*) FROM `proj.dataset.table`;
none
credentials-secret-key Key within the Secret that holds the service-account key JSON. key.json
credentials-secret-name Name of the Kubernetes Secret holding a GCP service-account key JSON. gcp-service-account

WorkflowTemplate

Download template.yaml

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: bigquery-query
  labels:
    dagweave.io/catalog-item: bigquery-query
  annotations:
    # The catalog semver this manifest was authored at. The dagweave app records
    # (catalog-item-id, semver) -> content-hash -> base-vN when it mints the tenant
    # cluster name via ResolveOrMint. Keep in sync with metadata.yaml `version`.
    dagweave.io/catalog-version: "1.0.4"
    dagweave.io/catalog-category: "Databases"
spec:
  entrypoint: query
  templates:
    - name: query
      inputs:
        parameters:
          # The Standard SQL query to run.
          - name: query
          # GCP project to bill the query to.
          - name: project
          # Name of the Kubernetes Secret holding a GCP service-account key JSON.
          # Defaults let a user leave them blank in the Inspector.
          - name: credentials-secret-name
            default: gcp-service-account
          - name: credentials-secret-key
            default: key.json
      container:
        # Pinned by digest per the catalog convention: an image rebuild can never
        # silently change the behaviour of an already-released item version.
        # google/cloud-sdk:slim (ships the bq CLI)
        image: google/cloud-sdk@sha256:b38f2881552c3054d140c8eeb4ad88bdc0eb4deeeb38507c5dac1403adc3ee64
        command: [sh, -c]
        # The query and project are passed as env vars (below), never interpolated
        # into the shell, so a query with quotes or shell metacharacters is safe. The
        # service-account key comes from the Secret via the GOOGLE_CREDENTIALS env var
        # and is written to a file so gcloud can activate it; --use_legacy_sql=false
        # selects Standard SQL.
        args:
          - |
            set -eu
            umask 077
            printf '%s' "$GOOGLE_CREDENTIALS" > /tmp/key.json
            gcloud auth activate-service-account --key-file=/tmp/key.json --quiet
            bq --project_id="$PROJECT" query --use_legacy_sql=false "$QUERY"
        env:
          - name: QUERY
            value: "{{inputs.parameters.query}}"
          - name: PROJECT
            value: "{{inputs.parameters.project}}"
          - name: GOOGLE_CREDENTIALS
            valueFrom:
              secretKeyRef:
                name: "{{inputs.parameters.credentials-secret-name}}"
                key: "{{inputs.parameters.credentials-secret-key}}"

Version history

Read from the item's changelog. Each version has its own JSON document; the pinned catalogue vendors the manifest of the latest one, so that is the version that installs.

  1. 1.0.4 latest 2026-08-20

    Repin google/cloud-sdk:slim onto 581.0.0-slim, the digest :slim now heads at. gcloud goes 580.0.0 to 581.0.0 on the same Dockerfile: Entrypoint, Cmd, User and WorkingDir match across both digests and the only layers that differ are the ones carrying the version argument. The four util-linux advisories the old pin went red on, CVE-2026-53612 through CVE-2026-53615, are gone with Debian's 2.41.5-0+deb13u1, so the OS baseline record is deleted rather than rewritten. The eleven vendored advisories are the same eleven on both digests and keep their record.

    kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/bigquery-query/1.0.4/template.yaml
    argo template create -n argo https://catalog.dagweave.com/api/v1/items/bigquery-query/1.0.4/template.yaml

    version document, template.yaml

  2. 1.0.3 2026-08-11

    Repin google/cloud-sdk:slim on the current digest, which is also the newest 580.0.0-slim. gcloud goes 579.0.0 to 580.0.0 and bq stays at 2.1.36. The last fixable OS-package HIGH, linux-libc-dev CVE-2026-64561, is gone with the newer Debian trixie base, so the OS baseline record is deleted rather than rewritten. The three cryptography advisories in the bundled Python are unmoved and keep their record.

    This release is documented, but its manifest is not vendored here, so it has no install command. Version document

  3. 1.0.2 2026-08-11

    Repin google/cloud-sdk:slim on the current digest. Same tag, newer build. Fixable OS-package HIGH drops from 21 to 1: the libexpat1 and linux-libc-dev updates have landed, one newer linux-libc-dev has not. gcloud goes 578.0.0 to 579.0.0 and bq stays at 2.1.36.

    This release is documented, but its manifest is not vendored here, so it has no install command. Version document

  4. 1.0.1 2026-08-02

    Repin google/cloud-sdk:slim on the current digest. Same tag, newer build. Fixable CRITICAL/HIGH drops from 37 to 18.

    This release is documented, but its manifest is not vendored here, so it has no install command. Version document

  5. 1.0.0 2026-07-17

    Initial release.

    This release is documented, but its manifest is not vendored here, so it has no install command. Version document

Run it once

After installing, from the command line.

argo submit -n argo --from workflowtemplate/bigquery-query \
  -p project=my-gcp-project \
  -p query='SELECT count(*) FROM `proj.dataset.table`;'

Workflow that references it

A Workflow with the required parameters filled from the examples.

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: bigquery-query-
spec:
  workflowTemplateRef:
    name: bigquery-query
  arguments:
    parameters:
      - name: project
        value: "my-gcp-project"
      - name: query
        value: "SELECT count(*) FROM `proj.dataset.table`;"

As a step of a larger workflow

steps:
  - - name: bigquery-query
      templateRef:
        name: bigquery-query
        template: query