SNOW-1569617: Allow multi statement queries to stream the result of the final query #880
Labels
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
What is the current behavior?
Currently, if you use a multi statement query such as:
You will get a stream of the results of the first query. In this case
'first query'
will be streamed to you.What is the desired behavior?
Have the ability to stream the result of the second query, such that
logs
'second query'
.How would this improve
snowflake-connector-nodejs
?This would greatly improve the usability of the connector. For example, there are cases I need to set a session variable in the first query, and then query a view that relies on the session variable in the second. Presently, I cannot use the
streamRows
feature of the driver to do this and consume the results of the view query.Here is an example:
The stream will be empty as it will contain the output of the session variable setting. Instead, I'd like to see the result of the view.
I can work around this by using the more verbose event syntax, looking something like this in this case:
References, Other Background
It would also be great if the fact that streamRows returns the results of the first query was documented. Had to plumb through forums and experiments on my local machine to figure this out.
What is your Snowflake account identifier, if any?
FAUNA-GK58919
The text was updated successfully, but these errors were encountered: