Skip to content

Commit

Permalink
Handle non-English Snowflake error message for non-existing schemas (#…
Browse files Browse the repository at this point in the history
…840)

* Handle Japanese Snowflake error message for non-existing schemas

* impl.py を更新

Co-authored-by: Anders <[email protected]>

* Changelog entry

* Update dbt/adapters/snowflake/impl.py

Co-authored-by: Doug Beatty <[email protected]>

---------

Co-authored-by: Anders <[email protected]>
Co-authored-by: Doug Beatty <[email protected]>
Co-authored-by: Doug Beatty <[email protected]>
Co-authored-by: colin-rogers-dbt <[email protected]>
Co-authored-by: Mike Alfare <[email protected]>
  • Loading branch information
6 people authored Nov 20, 2024
1 parent dca565b commit 8e027d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
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"
4 changes: 3 additions & 1 deletion dbt/adapters/snowflake/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,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

0 comments on commit 8e027d8

Please sign in to comment.