This repo provides a production example of a dbt project containting metrics and semantic models. These resources are required to use the dbt semantic layer. To get started, follow the instructions below:
- Snowflake
- 🚧 dbt cloud for some of the workflows can also set most of this up via dbt core
- taskfile
task deps
- Update the
profile
withindbt_project.yml
to refer to one of your pre-existing profile
dbt debug
dbt seed
dbt build --exclude path:jaffle-data
mf validate-configs
mf query --metrics large_orders
sqlfluff lint models
sqlfluff fix models
Review your impact of code changes on the data. See pull requests for cloud demo.
🚧 do some local dev regression testing demos.
mf list metrics
mf query --metrics revenue
mf list dimensions --metrics revenue
mf query --metrics revenue --group-by product__product_name
mf list entities --metrics revenue
Lets look at using time
mf query --metrics revenue --group-by metric_time
mf query --metrics revenue --group-by metric_time__month
mf query --metrics revenue --group-by metric_time__week
mf query --metrics revenue --group-by metric_time__year
user dbt sl
instead of mf
in dbt cloud
dbt semantic layer only possible currently with teams or enterprise editions.
coming soon in single tenant: Set up the dbt Semantic Layer | dbt Developer Hub