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

Handle non-English Snowflake error message for non-existing schemas #840

Merged
merged 10 commits into from
Nov 20, 2024

Conversation

pei0804
Copy link
Contributor

@pei0804 pei0804 commented Nov 22, 2023

resolves #834

Problem

Handling is failing because the error message is different between Japanese and English.

Solution

Handle the error message regardless of language by using the error code instead.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

@pei0804 pei0804 requested a review from a team as a code owner November 22, 2023 01:04
Copy link

cla-bot bot commented Nov 22, 2023

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @pei0804

@pei0804
Copy link
Contributor Author

pei0804 commented Nov 22, 2023

Confirmation of differences in messages.

MY_USER#[email protected]>alter USER MY_USER set LANGUAGE = 'ja';
+----------------------------------+
| status                           |
|----------------------------------|
| Statement executed successfully. |
+----------------------------------+
1 Row(s) produced. Time Elapsed: 0.096s
MY_USER#[email protected]>show terse objects in db.schema;
002043 (02000): SQLコンパイルエラー:
オブジェクトは存在しないか、操作を実行できません。
MY_USER#[email protected]>alter USER MY_USER set LANGUAGE = 'en';
+----------------------------------------+
| status                                 |
|----------------------------------------|
| ステートメントは正常に実行されました。 |
+----------------------------------------+
1 Row(s) produced. Time Elapsed: 0.126s
MY_USER#[email protected]>show terse objects in db.schema;
002043 (02000): SQL compilation error:
Object does not exist, or operation cannot be performed.

@pei0804
Copy link
Contributor Author

pei0804 commented Nov 22, 2023

@dbeatty10
I fixed and CLA signed.
Please review.

@nathaniel-may
Copy link
Contributor

Hi @pei0804 - Thanks for putting up this PR. What you proposed would work, but only for Japanese and only for this error. In order to merge a fix, we would need it to be generally applicable to all language changes. I've created #843 which is describes the change we would need.

Co-authored-by: Anders <[email protected]>
@cla-bot cla-bot bot added the cla:yes label Nov 23, 2023
@pei0804
Copy link
Contributor Author

pei0804 commented Nov 23, 2023

@nathaniel-may

As for the other methods, do I fix another PR?

@pei0804
Copy link
Contributor Author

pei0804 commented Nov 23, 2023

@dbeatty10 fixed.

@nathaniel-may
Copy link
Contributor

@pei0804 thanks for the change! I'm adding this PR to the queue to be reviewed by an engineer.

@dbeatty10 dbeatty10 added the ready_for_review Externally contributed PR has functional approval, ready for code review from Core engineering label Nov 29, 2023
@dbeatty10 dbeatty10 changed the title Handle Japanese Snowflake error message for non-existing schemas Handle non-English Snowflake error message for non-existing schemas Nov 29, 2023
Copy link
Contributor

github-actions bot commented Jun 6, 2024

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

@github-actions github-actions bot added the Stale label Jun 6, 2024
@dbeatty10 dbeatty10 removed the Stale label Jun 6, 2024
@mikealfare mikealfare self-assigned this Nov 9, 2024
@mikealfare mikealfare added the community This PR is from a community member label Nov 18, 2024
@mikealfare mikealfare enabled auto-merge (squash) November 18, 2024 22:33
@mikealfare mikealfare removed the request for review from nathaniel-may November 18, 2024 22:33
@mikealfare mikealfare merged commit 8e027d8 into dbt-labs:main Nov 20, 2024
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes community This PR is from a community member ok to test ready_for_review Externally contributed PR has functional approval, ready for code review from Core engineering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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