You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that running queries which take longer than 45 seconds return with no result and no error. The endpoint I am using when I experience this is rowsForRunningQuery. Based on the name of this API, I would expect to be able to submit a query in async mode, and then call this API to wait for it to return. The function, getQueryResultResp just waits 45 seconds, but since I am using it through QueryContext I would expect this to be blocking. When this happens nothing returns. The response from FuncGet indicates the status of the query, and I am wondering, why not pull until the query is no longer running? (see `ErrQueryIsRunning = 279301 from errors.go:240)
If you are interested in reproducing this is what I am doing:
ctx = gosnowflake.WithAsyncMode(gosnowflake.WithAsyncModeNoFetch(ctx))
ctx = gosnowflake.WithFetchResultByID(ctx, snowflakeQueryIdFromOriginalSubmit)
// schedule the execution of the query in async mode
asyncResult, err := conn.QueryContext(ctx, "")
if err == nil && asyncResult != nil {
if asyncResult.Inner() != nil {
if snowflakeResult, ok := asyncResult.Inner().(gosnowflake.SnowflakeResult); ok {
if snowflakeResult == nil {
do something
}
}
}
// calling Close() here will block until either the query completes or the ctx expires. If the context expires
// we rely on the snowflake driver async impl to also cancel the running query
err = asyncResult.Close()
}
Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!
What version of GO driver are you using?
Latest (1.6.20)
What operating system and processor architecture are you using?
Mac M1
What version of GO are you using?
run go version in your console
1.20
4.Server version:* E.g. 1.90.1
You may get the server version by running a query:
SELECT CURRENT_VERSION();
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
What did you expect to see?
What should have happened and what happened instead?
Can you set logging to DEBUG and collect the logs?
I found that running queries which take longer than 45 seconds return with no result and no error. The endpoint I am using when I experience this is
rowsForRunningQuery
. Based on the name of this API, I would expect to be able to submit a query in async mode, and then call this API to wait for it to return. The function,getQueryResultResp
just waits 45 seconds, but since I am using it throughQueryContext
I would expect this to be blocking. When this happens nothing returns. The response from FuncGet indicates the status of the query, and I am wondering, why not pull until the query is no longer running? (see `ErrQueryIsRunning = 279301 from errors.go:240)If you are interested in reproducing this is what I am doing:
Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!
What version of GO driver are you using?
Latest (1.6.20)
What operating system and processor architecture are you using?
Mac M1
What version of GO are you using?
run
go version
in your console1.20
4.Server version:* E.g. 1.90.1
You may get the server version by running a query:
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
What did you expect to see?
What should have happened and what happened instead?
Can you set logging to DEBUG and collect the logs?
https://community.snowflake.com/s/article/How-to-generate-log-file-on-Snowflake-connectors
What is your Snowflake account identifier, if any? (Optional)
The text was updated successfully, but these errors were encountered: