Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-rogers-dbt committed Nov 22, 2024
2 parents 6148c26 + 8e027d8 commit 067ffae
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20231129-124145.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Handle non-English Snowflake error message for non-existing schemas
time: 2023-11-29T12:41:45.1273-07:00
custom:
Author: pei0804
Issue: "834"
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20241118-231637.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Add iceberg docs url to behavior flag.
time: 2024-11-18T23:16:37.926576-08:00
custom:
Author: versusfacit
Issue: "210"
5 changes: 4 additions & 1 deletion dbt/adapters/snowflake/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def _behavior_flags(self) -> List[BehaviorFlag]:
"benefits only those actively using it, we've made this behavior opt-in to "
"prevent unnecessary latency for other users."
),
"docs_url": "https://docs.getdbt.com/reference/resource-configs/snowflake-configs#iceberg-table-format",
},
{
"name": "default_dynamic_tables_to_transient",
Expand Down Expand Up @@ -267,7 +268,9 @@ def list_relations_without_caching(
# if the schema doesn't exist, we just want to return.
# Alternatively, we could query the list of schemas before we start
# and skip listing the missing ones, which sounds expensive.
if "Object does not exist" in str(exc):
# "002043 (02000)" is error code for "object does not exist or is not found"
# The error message text may vary across languages, but the error code is expected to be more stable
if "002043 (02000)" in str(exc):
return []
raise

Expand Down
2 changes: 1 addition & 1 deletion dbt/include/snowflake/macros/relations/table/create.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% macro snowflake__create_table_as(temporary, relation, compiled_code, language='sql') -%}

{%- if relation.is_iceberg_format and not adapter.behavior.enable_iceberg_materializations.no_warn %}
{% do exceptions.raise_compiler_error('Was unable to create model as Iceberg Table Format. Please set the `enable_iceberg_materializations` behavior flag to True in your dbt_project.yml. For more information, go to https://docs.getdbt.com/reference/resource-configs/snowflake-configs.') %}
{% do exceptions.raise_compiler_error('Was unable to create model as Iceberg Table Format. Please set the `enable_iceberg_materializations` behavior flag to True in your dbt_project.yml. For more information, go to https://docs.getdbt.com/reference/resource-configs/snowflake-configs#iceberg-table-format') %}
{%- endif %}

{%- set materialization_prefix = relation.get_ddl_prefix_for_create(config.model.config, temporary) -%}
Expand Down

0 comments on commit 067ffae

Please sign in to comment.