snowflake-connector-net icon indicating copy to clipboard operation
snowflake-connector-net copied to clipboard

Request for Asynchronous Queries Interface

Open Coder3333 opened this issue 4 years ago • 2 comments

The python sdk gives the option to start an asynchronous query directly and then use the query id to manually request the results. It looks like this would be a simple feature to add to the .Net sdk given the current code base. It could just be a new method added to SnowflakeDbCommand. Are there plans to add asynchronous queries to the .Net sdk in the near future?

https://docs.snowflake.com/en/user-guide/python-connector-example.html#label-python-connector-asynchronous-query-examples

Coder3333 avatar Sep 24 '21 20:09 Coder3333

I am really close to getting this to work, but I am having trouble with the last piece of the puzzle (how to get the status of the query). Can I get a hand?

This is my branch with the work so far. Look for SnowflakeDbAsynchronousQueryHelper: https://github.com/Coder3333/snowflake-connector-net/tree/AddAsync

Stackoverflow post asking how to get query status: https://stackoverflow.com/questions/70803863/how-to-get-execution-status-of-asynchronous-snowflake-query-by-query-id

Coder3333 avatar Jan 21 '22 19:01 Coder3333

I created this pull request with my effort to bring asynchronous queries to the .Net Connector

https://github.com/snowflakedb/snowflake-connector-net/pull/421

Coder3333 avatar Jun 30 '22 13:06 Coder3333

hi and thank you for submitting this issue , apologies for the long period without response. also thank you for sending the PR ! checked this repo and async api already seems to be available in recent versions of the driver since #510 , thus marking this issue as closed.

sfc-gh-dszmolka avatar Jun 07 '23 13:06 sfc-gh-dszmolka

hi and thank you for submitting this issue , apologies for the long period without response. also thank you for sending the PR ! checked this repo and async api already seems to be available in recent versions of the driver since #510 , thus marking this issue as closed.

@sfc-gh-dszmolka , Please, reopen this issue, as it has not been addressed. The issue that you referenced is simply a .Net way to make it easier to run multi-threaded code, locally. My request, and the PR, address the Snowflake Server side feature of starting a Snowflake query at the server, getting back a query id, and then being able to check on the status of the query with the id. The Python and Java clients have supported this feature all along. It is very sad that the .Net client still does not.

Coder3333 avatar Jun 07 '23 16:06 Coder3333

thank you for the explanation here, I was under the impression the async API is already available but apparently not fully. Anyways, we'll take a look.

sfc-gh-dszmolka avatar Jun 08 '23 06:06 sfc-gh-dszmolka

It is very disheartening that I provided a solution to this issue a year ago, and because it was ignored and the base code continued to change over that time, all of that work has to be scrapped and a new solution would need to be built. The java and python clients have had this feature for years. Why has it not be prioritized for .Net?

Coder3333 avatar Jun 08 '23 12:06 Coder3333

I don't have an answer for that and completely understand the disappointment here, which is quite rightful and I'm sorry you feel this way. I cannot account for the past, but I hope it's at least some kind of consolation that going forward (as seen in the other Snowflake open source driver repos as well) we're trying to address the mistakes from the past and provide more effort and resources for the open source repos and community.

sfc-gh-dszmolka avatar Jun 08 '23 12:06 sfc-gh-dszmolka

this has been implemented and released with the latest version of the .NET driver 3.1.0 closing this issue and thank you for bearing with us !

sfc-gh-dszmolka avatar Apr 08 '24 06:04 sfc-gh-dszmolka