Skip to content

Commit

Permalink
Merge branch 'main' into 1.9.latest
Browse files Browse the repository at this point in the history
  • Loading branch information
benc-db committed Sep 25, 2024
2 parents dcbeb0c + 44854db commit 60b487d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
- Fix places where we were not properly closing cursors, and other test warnings ([713](https://github.com/databricks/dbt-databricks/pull/713))
- Upgrade databricks-sql-connector dependency to 3.4.0 ([790](https://github.com/databricks/dbt-databricks/pull/790))

## dbt-databricks 1.8.7 (TBD)

### Fixes

- Stop setting cluster by to None. If you want to drop liquid clustering, you will need to full-refresh ([806]https://github.com/databricks/dbt-databricks/pull/806)

## dbt-databricks 1.8.6 (September 18, 2024)

### Fixes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,13 @@
{%- endmacro -%}

{% macro apply_liquid_clustered_cols(target_relation) -%}
{%- set file_format = config.get('file_format', default='delta') -%}
{%- set partition_by = config.get('partition_by', validator=validation.any[list, basestring], default=None) -%}
{%- set cols = config.get('liquid_clustered_by', validator=validation.any[list, basestring]) -%}
{%- if cols is not none %}
{%- if cols is string -%}
{%- set cols = [cols] -%}
{%- endif -%}
{%- endif -%}
{%- call statement('set_cluster_by_columns') -%}
ALTER {{ target_relation.type }} {{ target_relation }} CLUSTER BY ({{ cols | join(', ') }})
{%- endcall -%}
{%- elif not target_relation.is_hive_metastore() and file_format == "delta" and not partition_by -%}
{%- call statement('unset_cluster_by_columns') -%}
ALTER {{ target_relation.type }} {{ target_relation }} CLUSTER BY NONE
{%- endcall -%}
{%- endif %}
{%- endmacro -%}

0 comments on commit 60b487d

Please sign in to comment.