Skip to content

Commit

Permalink
comments and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed Sep 26, 2024
1 parent 2c91dd4 commit 529b875
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions dbt/adapters/snowflake/relation_configs/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,15 @@ def parse_relation_config(cls, relation_config: RelationConfig) -> Dict[str, Any

@classmethod
def parse_relation_results(cls, relation_results: RelationResults) -> Dict[str, Any]:
# this try block can be removed once enable_iceberg_materializations is retired
try:
catalog_results: "agate.Table" = relation_results["catalog"]
except KeyError:
# this happens when `enable_iceberg_materializations` is turned off
return {}

if len(catalog_results) == 0:
# this happens when the dynamic table is a standard dynamic table (e.g. not iceberg)
return {}

# for now, if we get catalog results, it's because this is an iceberg table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
-- Returns:
-- A valid DQL statement that will return metadata associated with an iceberg catalog
-#}
show iceberg tables
show iceberg tables
like '{{ relation.identifier }}'
in schema {{ relation.database }}.{{ relation.schema }}
;
Expand Down

0 comments on commit 529b875

Please sign in to comment.