github databricks/dbt-databricks v1.11.0

2 days ago

Features

  • Support databricks_tags for MV/STs
  • Add support for scalar SQL functions (SQL UDFs) (1197)
  • Add liquid clustering config for materialized views and streaming tables (thanks @reflection!) (1101)
  • Add official support for insert_overwrite incremental strategy for SQL warehouses. This strategy now uses REPLACE ON syntax for all compute types (previously INSERT OVERWRITE). This behavior is gated behind behavior flag use_replace_on_for_insert_overwrite which defaults true (1025)
  • Add support for Databricks query tags; NOTE: This feature is still in private preview, so it is not generally usable from the adapter yet.
  • Add support for managed iceberg when table_format is set to iceberg. This behavior is gated behind behavior flag use_managed_iceberg which defaults to false
  • Support delete+insert incremental strategy (thanks @canbekley!) (1217); if you have a current DBR (17.1+), this uses REPLACE ON for efficient replacement. Otherwise uses a 'delete from' statement follow by an insert statement (i.e. it is not atomic).

Fixes

  • BREAKING: Fix column order mismatch bug in incremental models by using INSERT BY NAME syntax (#1211)
    • When using on_schema_change: sync_all_columns, dbt previously used positional column matching in INSERT statements, causing values to be inserted into wrong columns when column order changed
    • Now uses Databricks INSERT BY NAME syntax to match columns by name instead of position, preventing data corruption
    • Breaking Change: Requires Databricks Runtime 12.2 LTS or higher
    • Users on older runtimes should pin to dbt-databricks 1.10.x
    • Affects all incremental strategies: append, insert_overwrite, replace_where, and merge (via table creation)
  • Fix case-sensitivity issues with column name handling in persist_docs and config diff operations (#1215)
    • Fixed KeyError when column names in models had different casing than YAML schema definitions
    • Improved efficiency of column tags and comments change detection to use case-insensitive comparison
  • Use backtick quoting for everything to avoid errors with special characters (1186)
  • Ensure column compare always uses lower case names (since Databricks stores internally as lower case) (1190)
  • Fix incompatible schema error during streaming table creation (1235)
  • Reintroduce support for external table type so as not to break users (1240)

Under the Hood

  • Materialized views now uses CREATE OR REPLACE where appropriate, instead of DROP + CREATE
  • Refactor to use Databricks SDK for API calls (1185)
  • Update dependency versions, and start using uv (1199)
  • Upgrade ruff and mypy (1207)
  • Allow create or replace semantics on full refresh in Mat V2 (1210)
  • Add centralized DBR capability system for managing version-dependent features with per-compute caching (#1218)
  • BREAKING: Removing the 'use_info_schema_for_columns' behavior flag, as we have a better mechanism for getting complex type information - DESCRIBE EXTENDED ... AS JSON. This is a breaking change because it requires a modern DBR (or SQL Warehouse) in order to function (1226). If this is breaking for you, you will either need to upgrade your cluster to 16.4+ or pin dbt-databricks to 1.10.x.
  • Use atomic CREATE OR REPLACE instead of DROP + CREATE for managed Iceberg tables
  • BREAKING: Drop support for python 3.9, adds 3.13 (1240)
  • BREAKING: Flipping the default for USE_USER_FOLDER_FOR_PYTHON to true (1248)

Don't miss a new dbt-databricks release

NewReleases is sending notifications on new releases.