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

SNOW-1618664: Documentation: List of SQL states/codes #1195

Closed
kevin-lindsay-1 opened this issue Aug 8, 2024 · 1 comment
Closed

SNOW-1618664: Documentation: List of SQL states/codes #1195

kevin-lindsay-1 opened this issue Aug 8, 2024 · 1 comment
Assignees
Labels
invalid question Issue is a usage/other question rather than a bug status-triage_done Initial triage done, will be further handled by the driver team

Comments

@kevin-lindsay-1
Copy link

When running queries, error codes/SQL states will sometimes be returned.

In this driver, you can see there are SnowflakeErrors that can be created.
https://github.com/snowflakedb/gosnowflake/blob/master/errors.go

These contain fields such as Number and SQLState.

There are also error codes sprinkled throughout the code, such as this one for whether or not a query is still in progress.
https://github.com/snowflakedb/gosnowflake/blob/master/restful.go#L27

While building applications, it would be especially useful to have a list of error codes/numbers/SQL states already known, so that we can use the appropriate retry policy on something like a locked timeout, for example.

Instead of writing SQL, getting back a specific error code, and then writing logic for that specific case, which is a very reactive process, it would be nice to be able to be proactive around these error codes, especially around retry logic.

Do you have a comprehensive list of error codes/SQL states, similar to how Microsoft does?
https://learn.microsoft.com/en-us/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes?view=sql-server-ver15

If not, it would be very valuable to have this, for reasons that should be obvious.

@github-actions github-actions bot changed the title Documentation: List of SQL states/codes SNOW-1618664: Documentation: List of SQL states/codes Aug 8, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka self-assigned this Aug 12, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka added status-triage_done Initial triage done, will be further handled by the driver team question Issue is a usage/other question rather than a bug invalid labels Aug 12, 2024
@sfc-gh-dszmolka
Copy link
Contributor

hi - thanks for submitting this issue. While we understand how useful such a list would be, if we think about it a bit, it is completely unspecific to gosnowflake or any other Snowflake driver.

errors and their codes are defined on the backend (Snowflake) and all our drivers have to adapt to the same error codes.

perhaps some good news is that this request is already from quite some of our customers, and is on the radar for the dev + docs team. While I cannot comment on anything timeline-wise, hopefully such a list will be released in the Snowflake documentation in the future.

If you're already a Snowflake customer, I recommend reaching out to your account team and let them know how important this list would be for you. Perhaps this can help prioritizing the solution.

For now, i'm marking this particular issue as closed as it is not a driver issue and not specific for this library but rather the backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid question Issue is a usage/other question rather than a bug status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

No branches or pull requests

2 participants