← Back to Pipeline
9
Reporting

Marts

Marts are the final output — star-schema fact and dimension tables that Power BI reads via DirectQuery. This is where the Data Vault meets the end user.

Dimension Tables

dim_customer     — name, address, region, segment, contact info
dim_product      — name, category, price, weight
dim_order        — order date, status, total amount
dim_warehouse    — name, location, capacity
dim_manager      — name, department
dim_contract     — terms, value, start/end dates
dim_invoice      — amount, due date, status
dim_payment      — amount, date, method

Fact Tables

fact_order_lines  — quantity, unit price, line total, discount
                    FK: customer, product, order, warehouse
fact_invoices     — invoice amount, outstanding balance
                    FK: customer, contract, order
fact_payments     — payment amount, method
                    FK: customer, contract, invoice

How Marts Use PITs + Bridge

Each dimension joins a PIT table to its satellites to get the latest attribute version per as-of date. The fact tables join the bridge to get pre-resolved keys, then attach measures from the relevant satellites.

This is why the business vault exists — without PITs and Bridges, every mart would need window functions and multi-table joins against the raw vault. With them, marts are simple SELECT + JOIN queries.

Historical Dimensions

Dimensions like customer, product, and order include an as_of_date column. Power BI uses composite keys (hash_key + as_of_date) to join facts to the correct historical version of each dimension. This means a report filtered to "March 2026" shows the customer name and product price as they were in March — not today's values.

Materialization

Marts are materialized as tables (not views, not incremental). On each run, they are fully rebuilt from the latest PITs and Bridge. This is fast because PITs and Bridge are already pre-computed — the mart query is just joins and projections.

Power BI DirectQuery

Power BI connects to these marts via DirectQuery — no data is imported into the Power BI file. Every time a user opens a report or applies a filter, Power BI sends a live SQL query to PostgreSQL. This means reports always show the latest data, with zero scheduled refreshes.