← All use cases
One workbook from three systems
The numbers for one pack live in different places: stores in a local DuckDB file, the product catalogue in Postgres, locations in Databricks. You want one workbook, not three exports glued together by hand. Declare the tables as sources once, with the connection each lives on, and every query runs where its tables are.
↓ Download the workbook (three_engines.xlsx)
version: 2
sources:
- name: shop
profile: shop_duck
schema: main
tables: [{name: stores}]
- name: shop_pg
profile: shop_pg
schema: public
tables: [{name: products}]
- name: career_vista
profile: databricks_oauth
database: workspace
schema: career_vista
tables: [{name: locations}]queries:
- {query: tri_duck_stores, tab_name: DuckDB}
- {query: tri_pg_products, tab_name: Postgres}
- {query: tri_databricks_locations, tab_name: Databricks}
output:
format: xlsx
destination:
- {profile: local, path: "out/three_engines-{{ run.date.yyyymmdd }}.xlsx"}select '{{ connection.type }}' as engine, count(*) as products
from {{ source('shop_pg', 'products') }}dre ls -s three_engines
dre run three_engines