/bigtesty:troubleshootingfrom BigTesty
Diagnoses BigTesty test failures by exit code: assertion diffs (exit 1), invalid config/test files or GCP auth errors (exit 2), location/CMEK errors, max_bytes_billed overruns, SQL rewrite issues, or leftover datasets. Use when bigtesty test, pytest with BigTesty, or bigtesty infra create fails.
Ships in BigTesty. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Start from the exit code and the first error line, then reproduce on the failing scenario only:
bigtesty test -k <scenario> --cleanup never -v # -v shows the executed (rewritten) SQL
To read the failures as data, add --report-json report.json: per scenario the status, the changed, missing,
unexpected and duplicated rows of each check, and for a failed step its file, job, messages, position and executed SQL.
--cleanup never keeps the datasets (<dataset>_<run_id>_<index>, the run ID is in the report) to query them in
BigQuery. Delete them after with bigtesty infra destroy --run-id <run_id> (not bigtesty gc --older-than-hours 0,
which would also delete the datasets of the runs in progress of the other developers and pipelines).
The report shows, per then block, the changed rows (matched on their key_columns, or on their equal columns),
the missing and the unexpected rows:
failures_per_feature / rows:
expected 3 rows, got 3: 1 changed, 1 missing, 1 unexpected
changed {featureName: "f1"} n: 2 → 1
missing {featureName: "f4", n: 1}
unexpected {featureName: "f3", n: 1}
rerun: bigtesty test -k "monitoring/failures.bigtesty.yaml::wrong_value_and_missing_row"
expected N rows, got M: a join, a filter or a given row is missing. Query the kept datasets.ignore_order: false: add the ORDER BY to the query.compare_columns: expected_only. Non-deterministic columns: ignore_columns.key_columns of the result. duplicated
rows (with key_columns): the SQL writes a key twice, e.g. a join or an INSERT run twice.float_tolerance. Dates and numerics are compared typed: a format difference is not a failure.bigtesty test --update rewrites the expected_files; review the diff.| Message | Fix |
|---|---|
No bigtesty.yaml / bigtesty.yml / bigtesty.json found | run from the project, or --config / BIGTESTY_CONFIG |
The GCP project is missing | --project, BIGTESTY_PROJECT / GOOGLE_CLOUD_PROJECT, or project: |
The location of the dataset ... is missing | location: in the config or the dataset |
the dataset X is not declared in the project config | declare it in bigtesty.yaml, with its tables |
Invalid file ... | the Pydantic error names the field; bigtesty validate checks everything |
reserved label keys | bigtesty and bigtesty_run_id are set by BigTesty |
... the SQL renderer failed: KeyError: 'ds' | a var of the template is missing: add it to the vars of the scenario or the config |
vars are set but the config has no sql_renderer | declare the sql_renderer of the team in bigtesty.yaml |
The type of the parameter ... can't be inferred | null, empty array or other types: {type: DATE, value: ...} |
GCP authentication error | gcloud auth application-default login, or the CI auth step |
The error names the failed step (ddl of <dataset>, given <table>, when, then <name>), its SQL file, the
BigQuery job, and the executed SQL (rewritten to the scenario datasets) with a caret at the position of the error.
For a given, it shows the rows rejected by the load job.
Access Denied / 403: the account needs roles/bigquery.user on the test project, plus read access to any
dataset of another project that the SQL reads without declaring it.Not found: Dataset prod-project:monitoring: the reference was not rewritten. Add the project to
project_aliases, or declare the dataset. Check the rewritten SQL with -v.FROM x AS monitoring); rename the alias.Query parameter 'x' not found: add it to the parameters of the scenario, the when or the then.Syntax error: Unexpected "{"): the sql_renderer is missing or doesn't render this
syntax; bigtesty test -v shows the executed SQL.Query exceeded limit for bytes billed: raise max_bytes_billed, or reduce the scanned data (partition filter).location per dataset if needed.europe for EU, us for US, otherwise the same region) and
the BigQuery encryption service account (bq show --encryption_service_account) needs
roles/cloudkms.cryptoKeyEncrypterDecrypter on the key.given row rejected by the load job: its values don't match the table schema (type, REQUIRED field).BigTestyInfra: they share the infra's data; call reset() at the
start of each test.Killed runs, cleanup: never, on_success after a failure, or a missing bigtesty infra destroy. The tables
expire after table_expiration_hours; bigtesty gc --dry-run lists the datasets labelled bigtesty, bigtesty gc
deletes them.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub tosun-si/bigtesty --plugin bigtesty4 skills in this plugin
/python-testsTest Python code, pipelines or tools that read or write BigQuery (jobs, services, dbt...) on an ephemeral BigQuery infra with BigTesty's BigTestyInfra in pytest or unittest, or from another language (Java / JUnit 5, Testcontainers, Go) with bigtesty infra create / destroy. Use when an integration test needs real BigQuery datasets created in a setup and deleted in a teardown, rather than testing SQL alone./setupSet BigTesty up in a project to test BigQuery SQL on real BigQuery - install it with uv, authenticate on GCP, write the bigtesty.yaml config (datasets, tables, DDL, labels, CMEK, cleanup, max_bytes_billed) and run the tests in CI (GitHub Actions, GitLab CI, Cloud Build). Use when adding BigTesty to a project, writing or reviewing a bigtesty.yaml, wiring the tests in a pipeline, or upgrading from BigTesty 0.x./writing-testsWrite BigTesty test files (*.bigtesty.yaml) that test BigQuery SQL - a query, a script, a MERGE, a procedure - with given rows, a when step and then assertions (expected rows, row_count, Python functions). Use when testing BigQuery SQL with BigTesty, adding a scenario, choosing between inline expected rows and expected files, generating them with --update, or reviewing a test file.Other plugins' skills for the same job