Skip to content

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.

  • 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 or join rather than printing the list.
  • round rounds half to even, as Python does: 2.5 | round is 2.0, 3.5 | round is 4.0.
  • // and % follow Python for negative numbers: -7 // 2 is -4, -7 % 3 is 2.
  • Dividing by zero fails the render (unable to calculate 1 / 0) instead of giving a value.
  • min and max compare strings ignoring case by default and take case_sensitive=true and attribute=. int and float take default=, and int takes base=.
  • title starts words only after whitespace or -, (, {, [, <: "don't" | title is Don't.
  • -foo.bar negates foo.bar (it used to look up bar on -foo). Booleans count as numbers in built-in filters, and a and b / a or b return an operand, not true/false.
  • dre query and dre catalog take only --output-file. The old name, --output-json, deprecated in 0.4.3, is gone there (dre run --output-json <dir> is unchanged).
  • 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 clickhouse under plugins: in dependencies.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’s string_literal), so core no longer assumes every database has chr(). Run dre plugin update clickhouse to 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 xlsx to get it.