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
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? 1.7.0
What operating system and processor architecture are you using? MacOS Sonoma 14.1.2, ARM (Apple Sillicon, M2)
What version of GO are you using? go version go1.20 darwin/arm64
4.Server version: 7.44.1
What did you do?
CREATE OR REPLACE PROCEDURE test_procedure()
RETURNS TABLE()
LANGUAGE PYTHON
RUNTIME_VERSION = '3.10'
PACKAGES = ('snowflake-snowpark-python')
HANDLER = 'test_procedure'
EXECUTE AS CALLER AS
$$
def test_procedure(session):
return session.sql("SELECT 1")
$$
----
var sqls = []string{
"SELECT 1",
"CALL test_procedure()"
}
// execute multiple statements
What did you expect to see? What should have happened and what happened instead?
I expect that these queries can succeed, but I got errors like
server ErrorCode=100132, ErrorMessage=JavaScript execution error: Uncaught Execution of multiple statements failed on statement "CALL test_procedure(..." (at line 82, position 0).
Missing rowset from response. No results found. in SYSTEM$MULTISTMT at ' throw `Execution of multiple statements failed on statement {0} (at line {1}, position {2}).`.replace('{1}', LINES[i])' position 4
stackstrace:
SYSTEM$MULTISTMT line: 10
Can you set logging to DEBUG and collect the logs?
hi - thank you for submitting this issue. we'll take a look.
sfc-gh-dszmolka
changed the title
Calling stored procedure returning a table in multi-statements query fail with code = 100132
SNOW-995714 Calling stored procedure returning a table in multi-statements query fail with code = 100132
Jan 2, 2024
sfc-gh-dszmolka
changed the title
SNOW-995714 Calling stored procedure returning a table in multi-statements query fail with code = 100132
SNOW-995714 SNOW-998050 Calling stored procedure returning a table in multi-statements query fail with code = 100132
Jan 2, 2024
Thank you for your patience while I was looking and also for providing the detailed description !
Reproduced the exact same behaviour with the Snowflake JDBC driver as well, so we can conclude the behaviour is not a bug and not even coming from the Snowflake Go driver - instead it is how the Snowflake backend behaves.
After some research and experimenting, I could make the multi-statement query work
SELECT 0;
CALL test_procedure();
having your stored procedure, with setting the result set to JSON: alter account set JDBC_QUERY_RESULT_FORMAT = 'JSON';
After setting the result format to JSON, the same Java repro program started to work, which was just before exhibiting the same behaviour as you're seeing with the Go driver.
Note that you don't necessarily need to set the result format to JSON on the whole account to affect all queries; you can set it also on USER level (ALTER USER SET... ) and also on the SESSION level (ALTER SESSION SET.., this perhaps even part of the multi-statement query) . Maybe it can be a workaround for you too.
In the meantime I asked the relevant internal teams to take a look to decide if this is really the intended behaviour on the server side; and if so, document it.
For now, I'm closing this issue because it is not coming from the gosnowflake library.
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? 1.7.0
What operating system and processor architecture are you using? MacOS Sonoma 14.1.2, ARM (Apple Sillicon, M2)
What version of GO are you using? go version go1.20 darwin/arm64
4.Server version: 7.44.1
I expect that these queries can succeed, but I got errors like
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: