A dbt project built on the Starburst Galaxy sample.burstbank dataset — a fictional retail bank with customers, accounts, and payment history across three product lines: credit cards, mortgages, and auto loans.
- Python 3.9+
- A Starburst Galaxy cluster with access to the
samplecatalog and write access to alakehousecatalog - A
lakehousecatalog configured in your Galaxy cluster (Iceberg recommended)
pip install -r requirements.txt
dbt depsCopy sample.profiles.yml to ~/.dbt/profiles.yml and set the required environment variables:
export GALAXY_HOST=<your-cluster-host>.trino.galaxy.starburst.io
export GALAXY_USER=you@example.com
export GALAXY_PASSWORD=your-passworddbt debugdbt run # build all models
dbt test # run schema tests
dbt docs generate && dbt docs serve # browse the data catalogTo build a single layer:
dbt run --select staging
dbt run --select martsmodels/
├── sources.yml # points to sample.burstbank (read-only source)
├── staging/ # one view per source table, written to lakehouse.burstbank_staging
│ ├── stg_accounts.sql
│ ├── stg_auto_loan_payments.sql
│ ├── stg_credit_card_payments.sql
│ ├── stg_customer_profiles.sql
│ ├── stg_customers.sql
│ ├── stg_employees.sql
│ ├── stg_mortgage_payments.sql
│ ├── stg_product_profiles.sql
│ └── stg_state_census.sql
└── marts/ # analytics-ready tables, written to lakehouse.burstbank_marts
├── dim_customers.sql
├── fct_payments.sql
└── rpt_customer_risk.sql
| Table | Description |
|---|---|
customer |
Customer demographics — name, address, DOB, FICO score |
account |
Per-customer account holding credit card, mortgage, and auto loan identifiers and balances |
customer_profile |
Customer segmentation — career, risk appetite, segment |
product_profile |
Product details — rates, loan officers, durations, vehicle/residence type |
credit_card_payment |
Credit card payment history |
mortgage_payment |
Mortgage payment history |
auto_loan_payment |
Auto loan payment history |
employee |
Bank employees, used to resolve loan officer names |
state_census |
US state population estimates for geographic enrichment |
Views that clean the source layer: varchar dates are cast to date, boolean flags (Y/N) are cast to booleans, and the manger_id typo in the employee table is corrected to manager_id.
| Model | Description |
|---|---|
dim_customers |
Customer dimension joining demographics, segmentation, and state census data |
fct_payments |
All payment events across credit cards, mortgages, and auto loans in a single table, with a product_type column and delinquency flag |
rpt_customer_risk |
Customer-level risk summary: total payments, delinquent payment count, delinquency rate, and outstanding balance by product |
| Catalog | Schema | |
|---|---|---|
| Source data (read-only) | sample |
burstbank |
| Staging views | lakehouse |
burstbank_staging |
| Mart tables | lakehouse |
burstbank_marts |