Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Crucible

Crucible is a local BigQuery API emulator, backed by DuckDB, for development and CI. Point your client at localhost and use dummy credentials. Queries run locally and cost nothing.

Status: BigQuery pre-alpha. A subset of the BigQuery REST API and SQL is implemented, with official Python client and dbt-bigquery smoke tests in CI. APIs and supported SQL may change. Snowflake support is planned; its server currently provides health checks and unsupported-endpoint errors only.

Principles

  • Correctness over performance. A slow, correct answer beats a fast, wrong one.
  • Unsupported means explicit. Anything Crucible does not support raises CrucibleUnsupportedError. It never returns a silently wrong result.
  • Fidelity is measured by the corpus. What Crucible matches is backed by recorded warehouse cases.

Quickstart

From a repository checkout, install dependencies with uv and start BigQuery on port 9050:

uv sync --extra server
uv run crucible serve --dialect bigquery

In another terminal, from the same checkout, run a query with the official Python client:

uv run --with google-cloud-bigquery python - <<'PY'
from google.auth.credentials import AnonymousCredentials
from google.cloud import bigquery

client = bigquery.Client(
    project="local-project",
    credentials=AnonymousCredentials(),
    client_options={"api_endpoint": "http://127.0.0.1:9050"},
)
print(next(iter(client.query("SELECT 6 * 7 AS answer").result())).answer)
client.close()
PY

Expected output: 42. Anonymous credentials and the explicit endpoint keep this query local.

For Docker, run the published pre-alpha image instead of the uv server:

docker run --rm -p 127.0.0.1:9050:9050 ghcr.io/callumwalterwhite/crucible-emulator:latest serve --dialect bigquery

To build the image yourself, run from the repository root:

docker build -f docker/Dockerfile -t crucible:local .
docker run --rm -p 127.0.0.1:9050:9050 crucible:local serve --dialect bigquery

Check either server with curl --fail http://127.0.0.1:9050/_crucible/health. More query, table, CSV load, and error examples are in examples/python-bigquery/. A full dbt project (seeds, views, tables, data tests) runs against Crucible in examples/dbt-bigquery/. Client and dbt connection details, including planned Snowflake support, are in docs/client-compat.md.

dbt versions

Use dbt-core 1.x with dbt-bigquery. dbt Fusion (the dbt 2.x binary) works for only part of a project:

Command dbt-core 1.12 + dbt-bigquery 1.12 dbt Fusion 2.0
dbt seed works works
dbt run works works
dbt test (data tests) works fails
unit tests works fails

Fusion reads query results through the BigQuery Storage Read API (gRPC). Crucible does not implement that API, and Fusion has no setting to point it at a local endpoint, so its reads go to Google. Any command that reads rows back fails, including dbt test and the test step of dbt build. CI tests dbt-core 1.9 and the latest 1.x. Fusion details: docs/client-compat.md.

Fusion installs itself as dbt on your PATH. Check dbt --version reports Core 1.x, or call the virtualenv's binary by path as examples/dbt-bigquery/ does.

What works

  • REST API: jobs (insert, get, cancel, query, getQueryResults), datasets and tables (list, get, insert, patch, delete), tabledata.list, routines (list, get), and CSV load jobs through resumable or multipart upload.
  • SQL: each area below has corpus cases checked against real BigQuery (239 of 246 cases recorded): aggregates, arrays and UNNEST, casts, conditionals, dates and times, error messages, hashing, JSON, math, regular expressions, strings, window functions, QUALIFY, SELECT * EXCEPT/REPLACE, and the statements dbt emits (CREATE TABLE AS with partitioning and clustering, views, INSERT, MERGE, ALTER TABLE, DROP).
  • Clients: google-cloud-bigquery for Python, dbt-core with dbt-bigquery, and dbt Fusion for seed and run.

Current limits

Crucible is pre-alpha. Unsupported features fail with Not supported by Crucible: ... instead of returning a guess. Not supported yet:

  • Scripting (DECLARE, BEGIN ... END), temporary and persistent SQL functions (CREATE FUNCTION).
  • INFORMATION_SCHEMA, wildcard tables (dataset.events_*), time travel (FOR SYSTEM_TIME AS OF).
  • Geography functions (ST_*).
  • The BigQuery Storage Read and Write APIs (gRPC), so to_dataframe() needs create_bqstorage_client=False, and dbt Fusion cannot run tests.
  • CSV loads into DATETIME columns, and load formats other than CSV.
  • Billing: totalBytesProcessed and totalBytesBilled are always 0.
  • Authentication and IAM: there is none (see Security).

If something you need is missing, open an issue with the query and the result real BigQuery returns.

Alternatives

goccy/bigquery-emulator is a more mature BigQuery emulator written in Go. It runs GoogleSQL on SQLite, supports more clients, and serves the Storage Read and Write APIs. Crucible runs on DuckDB and SQLGlot, and is narrower: it targets dbt development and CI, checks its results against recorded real BigQuery responses, and refuses what it cannot match.

Security

Crucible is a local development and CI tool with no authentication. It binds 127.0.0.1 by default, and you must never expose it on a network. See SECURITY.md for the deployment model and for how to report a vulnerability.

Documentation

License

Apache License 2.0. See LICENSE and NOTICE.

Metadata

Release files for crucible-emulator 0.1.0a2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crucible-emulator 0.1.0a2
File Size Uploaded Provenance
crucible_emulator-0.1.0a2.tar.gz 331.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for crucible-emulator 0.1.0a2
File Interpreter ABI Platform
crucible_emulator-0.1.0a2-py3-none-any.whl Python 3 none any Details

Total release size: 452.3 kB

Release files / crucible_emulator-0.1.0a2.tar.gz

Download URL crucible_emulator-0.1.0a2.tar.gz
Size 331.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e31340937b7f6acfaad84c2151e9d959580dc27934156c18d600374386922610
BLAKE2b-256 checksum
How to use checksums
603cc3688d2db1b1d97da59f65a0c7c133f0658211f328e584e88775bb7a57b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Release files / crucible_emulator-0.1.0a2-py3-none-any.whl

Download URL crucible_emulator-0.1.0a2-py3-none-any.whl
Size 120.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a604e8824624eda99370c96eda2f540f128346407e3784d21ec72b538550f9c5
BLAKE2b-256 checksum
How to use checksums
cd8e707ca8d108bcd66199b242bbfc0aecc8906e91907f966f3f3b629eea504b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Security for crucible-emulator 0.1.0a2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for crucible_emulator-0.1.0a2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page