v1.1.0 — Named connections + schema introspection
Read foreign sources declaratively, without hand-writing FDW boilerplate. Builds on the cross-warehouse Foreign Data Wrappers from 1.0.3.
Highlights
- Named connections. Define
connections:inworkflow_settings.yaml(non-secret platform/project/dataset/saKeyId/host defs; secrets stay in.df-credentials.json, keyed by connection name).warehouse:may name a connection. Tag adeclarationwithconnection:and SQLAnvil auto-generates the read-only FDW bridge (BigQuery or Postgres source) — the table becomesref()-able like any source.connection:is valid only on declarations (tables/views always build into your one read/write warehouse). sqlanvil introspect <connection> <schema.table>. Reads a source table's columns + comments, maps source types to your warehouse dialect (BigQuery → Postgres; Postgres → Postgres), and writes a ready-to-usedeclaration.sqlxwithcolumnTypesfilled in (--output <file>or stdout). Dev-time only —compile/runnever touch the network for schema.sqlanvil initnow defaults to--warehouse supabase(wasbigquery), fitting the Postgres/Supabase-first focus. Pass--warehouse postgres|bigqueryto override.
Install
npm install -g @sqlanvil/cli # 1.1.0Docs
- Foreign Data Wrappers (named connections + introspect): https://sqlanvil.com/docs/guides/foreign-wrappers/
SQLAnvil is not affiliated with or endorsed by Google. The Dataform name and related marks are trademarks of Google LLC; see NOTICE for attribution.