Skip to content

Commit

Permalink
unblocking iceberg snapshots, reactivating iceberg tests
Browse files Browse the repository at this point in the history
  • Loading branch information
benc-db committed Feb 5, 2025
1 parent 75a71dd commit e52e409
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
5 changes: 3 additions & 2 deletions dbt/adapters/databricks/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,10 @@ def update_tblproperties_for_iceberg(
raise DbtConfigError(
"When table_format is 'iceberg', cannot set file_format to other than delta."
)
if config.get("materialized") not in ("incremental", "table"):
if config.get("materialized") not in ("incremental", "table", "snapshot"):
raise DbtConfigError(
"When table_format is 'iceberg', materialized must be 'incremental' or 'table'."
"When table_format is 'iceberg', materialized must be 'incremental'"
", 'table', or 'snapshot'."
)
result["delta.enableIcebergCompatV2"] = "true"
result["delta.universalFormat.enabledFormats"] = "iceberg"
Expand Down
6 changes: 2 additions & 4 deletions tests/functional/adapter/iceberg/test_iceberg_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
from tests.functional.adapter.iceberg import fixtures


# @pytest.mark.skip_profile("databricks_cluster")
@pytest.mark.skip("Skip for now as it is broken in prod")
@pytest.mark.skip_profile("databricks_cluster")
class TestIcebergTables:
@pytest.fixture(scope="class")
def models(self):
Expand All @@ -21,8 +20,7 @@ def test_iceberg_refs(self, project):
assert len(run_results) == 3


# @pytest.mark.skip_profile("databricks_cluster")
@pytest.mark.skip("Skip for now as it is broken in prod")
@pytest.mark.skip_profile("databricks_cluster")
class TestIcebergSwap:
@pytest.fixture(scope="class")
def models(self):
Expand Down
11 changes: 11 additions & 0 deletions tests/functional/adapter/simple_snapshot/test_snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ class TestSnapshotCheck(BaseSnapshotCheck):
pass


@pytest.mark.skip_profile("databricks_cluster")
class TestSnapshotIceberg(BaseSnapshotCheck):
@pytest.fixture(scope="class")
def project_config_update(self):
return {
"snapshots": {
"+table_format": "iceberg",
}
}


class TestSnapshotPersistDocs:
@pytest.fixture(scope="class")
def models(self):
Expand Down

0 comments on commit e52e409

Please sign in to comment.