dbt models, kept live.
Install the dbt-basalt adapter and materialize models as Basalt views. They update incrementally as events arrive, not on a schedule.
Install the dbt-basalt adapter and materialize models as Basalt views. They update incrementally as events arrive, not on a schedule.
The adapter adds a materialized_view materialization that compiles each model to a Basalt view. Refs become view dependencies, and dbt tests run as SQL against the live result.
Install dbt-basalt with pip and add a basalt target to profiles.yml. Set materialized to materialized_view on the models you want live.
# register a dbt project with the workspace basalt connect dbt --project analytics --target prod
Write plain SQL over the source. Basalt keeps the view current with every record and tracks lineage back to the topic, partition and offset.
CREATE MATERIALIZED VIEW revenue_by_min AS SELECT date_trunc('minute', ts) AS minute, currency, sum(amount) AS revenue, count(*) AS payments FROM payments WHERE status = 'captured' GROUP BY 1, 2;
Every view is an endpoint the moment it exists. Call it over REST, connect with any Postgres client, or use the SDK from your app.
curl https://api.basalt.dev/v1/views/revenue_by_min?limit=5 \ -H "Authorization: Bearer $BASALT_TOKEN"
Models update as rows arrive, so there is no run schedule to tune.
not_null, unique and custom tests run against the live view.
Refs map to view dependencies, visible in both dbt docs and the console.
Keep batch models in your warehouse and live models in Basalt.