{
  "name": "bigquery-query",
  "title": "Run a BigQuery query",
  "category": "Databases",
  "tags": [
    "cloud-sdk",
    "databases"
  ],
  "version": "1.0.4",
  "date": "2026-08-20",
  "notes": "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.",
  "latest": true,
  "installable": true,
  "url": "https://catalog.dagweave.com/api/v1/items/bigquery-query/1.0.4.json",
  "templateUrl": "https://catalog.dagweave.com/api/v1/items/bigquery-query/1.0.4/template.yaml",
  "entrypoint": "query",
  "parameters": [
    {
      "name": "project",
      "title": "Project",
      "description": "GCP project to bill the query to.",
      "type": "string",
      "required": true,
      "example": "my-gcp-project"
    },
    {
      "name": "query",
      "title": "SQL query",
      "description": "The Standard SQL query to run.",
      "type": "string",
      "required": true,
      "example": "SELECT count(*) FROM `proj.dataset.table`;"
    },
    {
      "name": "credentials-secret-key",
      "title": "Credentials secret key",
      "description": "Key within the Secret that holds the service-account key JSON.",
      "type": "string",
      "required": false,
      "default": "key.json"
    },
    {
      "name": "credentials-secret-name",
      "title": "Credentials secret name",
      "description": "Name of the Kubernetes Secret holding a GCP service-account key JSON.",
      "type": "string",
      "required": false,
      "default": "gcp-service-account"
    }
  ],
  "images": [
    {
      "ref": "google/cloud-sdk@sha256:b38f2881552c3054d140c8eeb4ad88bdc0eb4deeeb38507c5dac1403adc3ee64",
      "repository": "google/cloud-sdk",
      "digest": "sha256:b38f2881552c3054d140c8eeb4ad88bdc0eb4deeeb38507c5dac1403adc3ee64"
    }
  ],
  "install": {
    "kubectl": "kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/bigquery-query/1.0.4/template.yaml",
    "argo": "argo template create -n argo https://catalog.dagweave.com/api/v1/items/bigquery-query/1.0.4/template.yaml"
  },
  "template": "apiVersion: argoproj.io/v1alpha1\nkind: WorkflowTemplate\nmetadata:\n  name: bigquery-query\n  labels:\n    dagweave.io/catalog-item: bigquery-query\n  annotations:\n    # The catalog semver this manifest was authored at. The dagweave app records\n    # (catalog-item-id, semver) -\u003e content-hash -\u003e base-vN when it mints the tenant\n    # cluster name via ResolveOrMint. Keep in sync with metadata.yaml `version`.\n    dagweave.io/catalog-version: \"1.0.4\"\n    dagweave.io/catalog-category: \"Databases\"\nspec:\n  entrypoint: query\n  templates:\n    - name: query\n      inputs:\n        parameters:\n          # The Standard SQL query to run.\n          - name: query\n          # GCP project to bill the query to.\n          - name: project\n          # Name of the Kubernetes Secret holding a GCP service-account key JSON.\n          # Defaults let a user leave them blank in the Inspector.\n          - name: credentials-secret-name\n            default: gcp-service-account\n          - name: credentials-secret-key\n            default: key.json\n      container:\n        # Pinned by digest per the catalog convention: an image rebuild can never\n        # silently change the behaviour of an already-released item version.\n        # google/cloud-sdk:slim (ships the bq CLI)\n        image: google/cloud-sdk@sha256:b38f2881552c3054d140c8eeb4ad88bdc0eb4deeeb38507c5dac1403adc3ee64\n        command: [sh, -c]\n        # The query and project are passed as env vars (below), never interpolated\n        # into the shell, so a query with quotes or shell metacharacters is safe. The\n        # service-account key comes from the Secret via the GOOGLE_CREDENTIALS env var\n        # and is written to a file so gcloud can activate it; --use_legacy_sql=false\n        # selects Standard SQL.\n        args:\n          - |\n            set -eu\n            umask 077\n            printf '%s' \"$GOOGLE_CREDENTIALS\" \u003e /tmp/key.json\n            gcloud auth activate-service-account --key-file=/tmp/key.json --quiet\n            bq --project_id=\"$PROJECT\" query --use_legacy_sql=false \"$QUERY\"\n        env:\n          - name: QUERY\n            value: \"{{inputs.parameters.query}}\"\n          - name: PROJECT\n            value: \"{{inputs.parameters.project}}\"\n          - name: GOOGLE_CREDENTIALS\n            valueFrom:\n              secretKeyRef:\n                name: \"{{inputs.parameters.credentials-secret-name}}\"\n                key: \"{{inputs.parameters.credentials-secret-key}}\"\n",
  "templateSha256": "2e7343f0baf741d83099c998ecb4971593db972d85729f7d97ec578b50e1e2d7",
  "source": "https://github.com/dagweave/catalog/tree/67458f74dbbf913b03177f3cefc69424be85eb1d/catalog/bigquery-query",
  "catalogSha": "67458f74dbbf913b03177f3cefc69424be85eb1d"
}
