Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit 8e027d8

Browse files
pei0804datadersdbeatty10colin-rogers-dbtmikealfare
authored
Handle non-English Snowflake error message for non-existing schemas (#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]>
1 parent dca565b commit 8e027d8

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Fixes
2+
body: Handle non-English Snowflake error message for non-existing schemas
3+
time: 2023-11-29T12:41:45.1273-07:00
4+
custom:
5+
Author: pei0804
6+
Issue: "834"

dbt/adapters/snowflake/impl.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,9 @@ def list_relations_without_caching(
257257
# if the schema doesn't exist, we just want to return.
258258
# Alternatively, we could query the list of schemas before we start
259259
# and skip listing the missing ones, which sounds expensive.
260-
if "Object does not exist" in str(exc):
260+
# "002043 (02000)" is error code for "object does not exist or is not found"
261+
# The error message text may vary across languages, but the error code is expected to be more stable
262+
if "002043 (02000)" in str(exc):
261263
return []
262264
raise
263265

0 commit comments

Comments
 (0)