Skip to content

v1.0.3 — cross-warehouse Foreign Data Wrappers

Choose a tag to compare

@ihistand ihistand released this 05 Jun 23:54
· 40 commits to main since this release

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 presetswrapper({ provider: "bigquery", server, serverOptions, credential, foreignTables }) emits a complete, correct BigQuery FDW bridge: enables the wrappers extension, registers the FDW (idempotent), and creates the server. Generic FDW is still reachable on any Postgres via explicit wrapper/handler/validator.
  • Ref-able foreign tables — each foreignTables[] entry becomes a ref()-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 exampleexamples/supabase_bigquery_mailing_list: builds a proximity mailing list of recent purchasers near a target ZIP, joining Supabase orders with Google's bigquery-public-data ZIP geo data via the FDW and PostGIS distance math.

Install

npm install -g @sqlanvil/cli   # 1.0.3

SQLAnvil is not affiliated with or endorsed by Google. The Dataform name and related marks are trademarks of Google LLC; see NOTICE for attribution.