Thanks for your interest in SQLAnvil — an open-source SQL workflow tool for BigQuery, PostgreSQL, and Supabase. Contributions of all kinds are welcome: bug reports, docs, adapter improvements, and new features.
SQLAnvil follows the standard GitHub fork-and-pull-request model. You do not need to be granted access to contribute — anyone can fork the repo and open a PR.
- Fork
sqlanvil/sqlanvilto your account. - Clone your fork and branch off
main:git clone git@github.com:<you>/sqlanvil.git cd sqlanvil git checkout -b my-change
- Make your change, then build and test (see below).
- Push to your fork and open a Pull Request against
sqlanvil/sqlanvilmain.
For anything larger than a small fix, open an issue first to discuss the approach before writing code.
There is no self-serve access request — that is by design. The fork-and-PR flow above is the contribution path. If you become a regular contributor and want direct push access, open an issue asking, and reference your merged PRs.
SQLAnvil uses Bazel for all build and test targets. There are no npm run scripts — everything goes through Bazel.
- Bazelisk —
npm install -g @bazel/bazelisk - Docker (recommended for macOS — see note below)
- Node.js 20 LTS (used by some tooling outside Bazel)
The pinned Bazel version has toolchain issues with macOS Tahoe (Bazel 5's wrapped_clang lacks LC_UUID). Use the Docker dev container until the toolchain is modernized:
# Build anything
./scripts/docker-bazel build //protos:sqlanvil_proto
# Interactive shell
./scripts/docker-bazel# Via the wrapper script (builds first if needed)
./scripts/run help
./scripts/run compile path/to/project
./scripts/run run path/to/project
# Via Bazel directly
bazel run //packages/@sqlanvil/cli:bin -- help# All tests
bazel test //...
# Core compiler tests only
bazel test //core/...
# Integration tests (requires warehouse credentials)
bazel test //tests/integration/...BigQuery: Place a GCP service account key at test_credentials/bigquery.json.
Postgres: The Postgres integration tests use a Docker fixture started by Bazel:
bazel test //tests/integration:postgres
# Bazel launches tools/postgres/postgres_fixture.ts automatically inside the sandbox- TypeScript throughout (no JavaScript in
core/orcli/) tslint.jsonand.prettierrcat the repo root- Run
bazel build //...andbazel test //...before submitting a PR
All packages are scoped under @sqlanvil/:
@sqlanvil/core— compiler and action types@sqlanvil/cli— command-line interface@sqlanvil/sample-extension— example extension package
- One logical change per PR. Keep diffs focused and reviewable.
- Clear description — what changed and why; link the related issue.
- Match existing style (see Code style above). Add or update tests for behavior changes.
- Adapters generate idiomatic SQL. The Postgres adapter is not a BigQuery adapter with translated SQL — it emits native Postgres DDL/DML (
INSERT ... ON CONFLICT, nativeCREATE INDEX,PARTITION BY RANGE/LIST/HASH). Don't leak BigQuery quirks (OPTIONS(...),CLUSTER BY,NOT ENFORCED) into Postgres output. - Rename is complete. All packages are scoped under
@sqlanvil/. Do not reintroducedataformidentifiers in new code.
Feature branches target main. Postgres/Supabase adapter work proceeds in sequence:
rename/dataform-to-sqlanvil— rename sweep (complete)adapter/postgres-first-class— Postgres adapter, SQL generator, proto changesadapter/supabase-variant— Supabase adapter and new action types
The upstream remote points at github.com/dataform-co/dataform. Pull upstream changes before starting new work:
git fetch upstream
git rebase upstream/mainThe rename sweep is complete. Upstream merges/cherry-picks should be straightforward (resolve any remaining conflicts on a case-by-case basis).