SNOW-1618664: Documentation: List of SQL states/codes #1195
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
When running queries, error codes/SQL states will sometimes be returned.
In this driver, you can see there are
SnowflakeError
s that can be created.https://github.com/snowflakedb/gosnowflake/blob/master/errors.go
These contain fields such as
Number
andSQLState
.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.
The text was updated successfully, but these errors were encountered: