dbt v0.12.2 - Grace Kelly
dbt v0.12.2 meaningfully improves the performance of dbt projects by more intelligently parallelizing the execution of models. Additionally, a number of workflow improvements have been added, some of which are detailed below. You can find the full list of changes in the release notes.
New Stuff
Improved Model Parallelization
dbt v0.12.2 introduces a new algorithm for the parallelization of dbt model execution. I wrote up some details on how dbt previously parallelized model execution, as well as how it now works with release. You can check out the post here.
Incremental Model Improvements
dbt’s incremental models are a great way to speed up model building and ultimately reduce your costs. This release makes it easier to build incremental models by deprecating the sql_where
config and providing some syntactic sugar for common use cases. Check out the brand new docs for building incremental models here.
Hook aliases
dbt’s pre- and post- hooks make it possible to run SQL before and after models have completed running. These hooks are super useful for granting access to models, or inserting records into an audit table. Historically, these pre-hook
and post-hook
configs have been difficult to add to model config()
blocks because they required use of the “dictionary” config syntax. This release provides pre_hook
and post_hook
aliases (note the underscore) to make hook configuration a breeze. This change won’t shake your inner soul, but it’s a nice improvement
Before:
{{
config({
"pre-hook": "grant select on {{ this }} to role bi_role"
})
}}
Now:
{{
config(
pre_hook="grant select on {{ this }} to role bi_role"
)
}}
dbt deps support on Windows
There were a number of issues with dbt deps
that have historically plagued dbt users on Windows. This release fixes many of those corner cases. Check the release notes for a full list of bugfixes and improvements.
dbt debug
dbt has had a dbt debug
command since the beginning, but it wasn’t super useful prior to v0.12.2. This command will help detect configuration errors for users old and new alike. Here’s some sample output:
$ dbt debug
dbt version: 0.12.2
python version: 3.7.1
python path: /Users/drew/fishtown/dbt/env/bin/python3
os info: Darwin-18.2.0-x86_64-i386-64bit
Using profiles.yml file at /Users/drew/.dbt/profiles.yml
Configuration:
profiles.yml file [OK found and valid]
dbt_project.yml file [OK found and valid]
profile: fishtown [OK found]
target: iam [OK found]
Required dependencies:
- git [OK found]
Connection:
host: xxxxxxxx
port: 5439
user: drew
dbname: analytics
schema: dbt_dbanin
method: iam
Connection test: OK connection ok
And more!
There’s lots more good stuff in the 0.12.2 release. Be sure to check out the release notes for a full rundown of the changes and additions in this release. If you’re interested in contributing to dbt, drop us a line on slack or get in touch in the issues.