Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADAP-1036] [Bug] Error handling fails in snowflake when language is not English #834

Closed
2 tasks done
pei0804 opened this issue Nov 18, 2023 · 4 comments · May be fixed by #840
Closed
2 tasks done

[ADAP-1036] [Bug] Error handling fails in snowflake when language is not English #834

pei0804 opened this issue Nov 18, 2023 · 4 comments · May be fixed by #840
Labels
bug Something isn't working Stale support

Comments

@pei0804
Copy link

pei0804 commented Nov 18, 2023

Is this a new bug in dbt-snowflake?

  • I believe this is a new bug in dbt-snowflake
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

In Japanese, Error handling fails at this code.

except DatabaseException as exc:
# 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):
return []
raise

This is Error messages.

Database Error
  002043 (02000): SQLコンパイルエラー:
  オブジェクトは存在しないか、操作を実行できません。

Expected Behavior

Errors can be handled and the process continues.

Steps To Reproduce

  1. Set Snowflake language to Japanese.
alter USER MY_USER set LANGUAGE = 'ja';
  1. dbt compile --select something
06:12:05  Encountered an error:
Database Error
  002043 (02000): SQLコンパイルエラー:
  オブジェクトは存在しないか、操作を実行できません。
make: *** [compile] Error 2

Relevant log output

The schema name and query ID are set to dummy values.


オブジェクトは存在しないか、操作を実行できません。
15:22:15.816929 [debug] [ThreadPool]: Snowflake adapter: Error running SQL: macro list_relations_without_caching
15:22:15.817485 [debug] [ThreadPool]: Snowflake adapter: Rolling back transaction.
15:22:15.818060 [debug] [ThreadPool]: On list_GENERIC_PREP_src_event_data: Close
15:22:15.923507 [debug] [ThreadPool]: Snowflake adapter: Snowflake query id: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
15:22:15.924533 [debug] [ThreadPool]: Snowflake adapter: Snowflake error: 002043 (02000): SQLコンパイルエラー:
オブジェクトは存在しないか、操作を実行できません。
15:22:15.925490 [debug] [ThreadPool]: Snowflake adapter: Error running SQL: macro list_relations_without_caching
15:22:15.926177 [debug] [ThreadPool]: Snowflake adapter: Rolling back transaction.
15:22:15.926894 [debug] [ThreadPool]: On list_GENERIC_PROD_project_alpha: Close
15:22:15.936018 [debug] [ThreadPool]: Snowflake adapter: Snowflake query id: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
15:22:15.936818 [debug] [ThreadPool]: Snowflake adapter: Snowflake error: 002043 (02000): SQLコンパイルエラー:
オブジェクトは存在しないか、操作を実行できません。
15:22:15.937702 [debug] [ThreadPool]: Snowflake adapter: Error running SQL: macro list_relations_without_caching
15:22:15.938387 [debug] [ThreadPool]: Snowflake adapter: Rolling back transaction.
15:22:15.939081 [debug] [ThreadPool]: On list_GENERIC_PREP_project_z: Close
15:22:16.008074 [debug] [MainThread]: Connection 'master' was properly closed.
15:22:16.008735 [debug] [MainThread]: Connection 'list_GENERIC_PREP_src_event_data' was properly closed.
15:22:16.009280 [debug] [MainThread]: Connection 'list_GENERIC_PROD_project_alpha' was properly closed.
15:22:16.009819 [debug] [MainThread]: Connection 'list_GENERIC_PROD_project_beta' was properly closed.
15:22:16.010353 [debug] [MainThread]: Connection 'list_GENERIC_PROD_project_gamma' was properly closed.
15:22:16.010887 [debug] [MainThread]: Connection 'list_GENERIC_PROD_project_delta' was properly closed.
15:22:16.011418 [debug] [MainThread]: Connection 'list_GENERIC_PREP_src_project_data' was properly closed.
15:22:16.011956 [debug] [MainThread]: Connection 'list_GENERIC_PREP_dq_project_epsilon_logs' was properly closed.
15:22:16.012490 [debug] [MainThread]: Connection 'list_GENERIC_PREP_dq_project_zeta_logs' was properly closed.
15:22:16.013230 [error] [MainThread]: Encountered an error:
Database Error
  002043 (02000): SQLコンパイルエラー:
  オブジェクトは存在しないか、操作を実行できません。
15:22:16.014218 [debug] [MainThread]: Command `dbt compile` failed at 15:22:16.014047 after 20.98 seconds
15:22:16.014885 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x1034f9f30>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x105b03520>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x10e983520>]}
15:22:16.015549 [debug] [MainThread]: Flushing usage events

Environment

macOS Monterey
Python 3.10.5
dbt-core 1.6.1
snowflake 1.6.0

Additional Context

This bug can be fixed by setting the appropriate Japanese for the handling if.
And I have ready to contriubute this issue.

@pei0804 pei0804 added bug Something isn't working triage labels Nov 18, 2023
@github-actions github-actions bot changed the title [Bug] Error handling fails in snowflake language is Japanese. [ADAP-1036] [Bug] Error handling fails in snowflake language is Japanese. Nov 18, 2023
@dbeatty10
Copy link
Contributor

Thanks for reporting this issue @pei0804 !

This bug can be fixed by setting the appropriate Japanese for the handling if.
And I have ready to contriubute this issue.

Do you want to open a pull request for this and tag @dbeatty10 in a comment when it's ready?

@dbeatty10 dbeatty10 removed the triage label Nov 21, 2023
@pei0804
Copy link
Author

pei0804 commented Nov 22, 2023

I will do it.

@dbeatty10 dbeatty10 changed the title [ADAP-1036] [Bug] Error handling fails in snowflake language is Japanese. [ADAP-1036] [Bug] Error handling fails in snowflake when language is not English Nov 29, 2023
Copy link
Contributor

github-actions bot commented Jun 4, 2024

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jun 4, 2024
Copy link
Contributor

Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants