Sign inSign up

stoix/bigquery-runner

By stoix

Updated almost 5 years ago

Run BigQuery jobs

Image
1

197

stoix/bigquery-runner repository overview

BigQuery Runner in Docker

Runs a BigQuery job and waits until the execution to finish returning with exit code 0 on success and a non-zero value for failure.

Maintained by STOIX.

How to use this image

Example of a local run using Docker:

docker run -it \
  -e ... \ # Add required environment variables
  stoix/bigquery-runner:LATEST

Environment Variables

The following environment variables are used to configure the BigQuery Runner. The required variables need to be provided, the rest have default values listed.

GCP_PROJECT_ID

Google Cloud project id for running the BigQuery job.

Default: The BigQuery Runner tries to infer the project when authenticating.

GCP_REGION

Google Cloud region for the BigQuery job. E.g: europe-north1.

Default: europe

GCP_SERVICE_ACCOUNT

Path to or Base64 encoded string of service account json to run the BigQuery job.

Default: If not set, the BigQuery Runner falls back on Google Cloud authentication flow for trying to infer authentication.

QUERY (one of QUERY or QUERY_PATH is required)

The query to run. Can be Base64 encoded.

QUERY_PATH (one of QUERY or QUERY_PATH is required)

Google Cloud Storage path to SQL files to run. It will use the provided path as a prefix for finding files.

With the following files:

gs://bucket/one.sql
gs://bucket/path/two.sql

The following combinations can be used:

  • gs://bucket runs both files.
  • gs://bucket/one.sql only runs one.sql.
  • gs://bucket/path only runs two.sql and any other SQL files you add to the path subpath later on.

Tag summary

Content type

Image

Digest

Size

356.4 MB

Last updated

almost 5 years ago

docker pull stoix/bigquery-runner