Skip to content

Commit

Permalink
Add end to end test for auto liquid clustering with optimize post hook
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaneMazur committed Feb 7, 2025
1 parent 896b89c commit a5b95a6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/functional/adapter/liquid_clustering/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@
{{ config(materialized='incremental', liquid_clustered_by='id') }}
select 1 as id, 'Joe' as name
"""

auto_liquid_cluster_sql = """
{{ config(materialized='incremental', auto_liquid_cluster=true) }}
select 1 as id, 'Joe' as name
"""
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,16 @@ def models(self):
def test_liquid_clustering(self, project):
_, logs = util.run_dbt_and_capture(["--debug", "run"])
assert "optimize" in logs


class TestAutoLiquidClustering:
@pytest.fixture(scope="class")
def models(self):
return {
"liquid_clustering.sql": fixtures.liquid_cluster_sql,
}

@pytest.mark.skip_profile("databricks_uc_cluster", "databricks_cluster")
def test_liquid_clustering(self, project):
_, logs = util.run_dbt_and_capture(["--debug", "run"])
assert "optimize" in logs

0 comments on commit a5b95a6

Please sign in to comment.