v1.0.3 — cross-warehouse Foreign Data Wrappers
Adds first-class Foreign Data Wrapper support to the wrapper() action, enabling live cross-warehouse queries — e.g. joining Supabase operational data with BigQuery in place.
Highlights
wrapper()provider presets —wrapper({ provider: "bigquery", server, serverOptions, credential, foreignTables })emits a complete, correct BigQuery FDW bridge: enables thewrappersextension, registers the FDW (idempotent), and creates the server. Generic FDW is still reachable on any Postgres via explicitwrapper/handler/validator.- Ref-able foreign tables — each
foreignTables[]entry becomes aref()-able table, so downstream models consume external data like any other source. Foreign tables depend on the server setup automatically. - Credential model — references a pre-existing Supabase Vault secret by id (
saKeyId); the service-account key JSON is never handled by SQLAnvil. Postgres-first design — only the credential path is Supabase-specific. - New example —
examples/supabase_bigquery_mailing_list: builds a proximity mailing list of recent purchasers near a target ZIP, joining Supabase orders with Google'sbigquery-public-dataZIP geo data via the FDW and PostGIS distance math.
Install
npm install -g @sqlanvil/cli # 1.0.3SQLAnvil is not affiliated with or endorsed by Google. The Dataform name and related marks are trademarks of Google LLC; see NOTICE for attribution.