New in 0.5
DRE 0.5 moves templates to MiniJinja 3, which follows Jinja2 (and so dbt) more closely. It’s a
minor release: most projects render the same SQL, but a few expressions now give a different
result. Run dre compile on your reports before and after updating and compare the SQL.
What changes
Section titled “What changes”Templates
Section titled “Templates”- Lists and dicts print like Python.
{{ ['a', 1] }}renders['a', 1](was["a", 1]),{{ dict(k='v') }}renders{'k': 'v'}, and.items()gives tuples:[('a', 1)]. Build SQL from a list with a loop orjoinrather than printing the list. roundrounds half to even, as Python does:2.5 | roundis2.0,3.5 | roundis4.0.//and%follow Python for negative numbers:-7 // 2is-4,-7 % 3is2.- Dividing by zero fails the render (
unable to calculate 1 / 0) instead of giving a value. minandmaxcompare strings ignoring case by default and takecase_sensitive=trueandattribute=.intandfloattakedefault=, andinttakesbase=.titlestarts words only after whitespace or-,(,{,[,<:"don't" | titleisDon't.-foo.barnegatesfoo.bar(it used to look upbaron-foo). Booleans count as numbers in built-in filters, anda and b/a or breturn an operand, nottrue/false.
Commands
Section titled “Commands”dre queryanddre catalogtake only--output-file. The old name,--output-json, deprecated in 0.4.3, is gone there (dre run --output-json <dir>is unchanged).
New plugins
Section titled “New plugins”- The clickhouse plugin 1.0.0 reads ClickHouse, self-hosted or
ClickHouse Cloud, over HTTP or its native protocol, with TLS and SSH bastions. Profile fields
follow dbt-clickhouse, so a dbt profile can be copied across. Add
clickhouseunderplugins:independencies.yml; it works with DRE 0.4.1 and later.
-
0.5.1: an inlined lookup holding
'or\works on ClickHouse. A source plugin now tells DRE how its database spells such text (the protocol’sstring_literal), so core no longer assumes every database haschr(). Rundre plugin update clickhouseto get 1.0.1. -
The xlsx plugin 1.1.1 updates its spreadsheet library: page scaling, number formats made of literal text, theme tint colours and row borders now come out as set. Run
dre plugin update xlsxto get it.