dbt-snowflake
dbt-snowflake copied to clipboard
[ADAP-1043] Handle errors more gracefully when Snowflake is configured to use languages other than English
New issue for problem raised in #834 with associated Community PR .
Snowflake allows users to set their language. When we string match to catch errors on the English wording this fails to catch errors when Snowflake is configured to use a language other than English.
- What was the original reason the code uses string matching here?
- Is there an alternative, language-agnostic way for us to identify errors? (python class types, error codes etc)
Definition of Done: When a user configures Snowflake to use any language other than English, the error handling behavior remains the same.
this error message string handling was introduced in #107 and happens currently in two places
get_columns_in_relation
https://github.com/dbt-labs/dbt-snowflake/blob/f67098d585b90303e5a946e363ba860ce9efe78c/dbt/adapters/snowflake/impl.py#L124-L126
list_relations_without_caching
https://github.com/dbt-labs/dbt-snowflake/blob/f67098d585b90303e5a946e363ba860ce9efe78c/dbt/adapters/snowflake/impl.py#L138-L139