-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add QUERY_TAG to SFSessionParameter enum please #362
Comments
Any updates on this? Is there a workaround? |
@DarthRinzler Can you provide some detail on the use case you have in mind for this? |
We would like to tag queries executed by our automation with meta-data details so that we can do then do analysis within snowflake to see which parts of our system were responsible for which queries, and what state they were in when the queries were executed etc. Snowflake query history can be filtered by the "QUERY_TAG" property which is a session parameter |
Thanks @DarthRinzler. We will evaluate this for Q2 and provide an update once it's confirmed. |
Much appreciated @sfc-gh-hkapre |
@DarthRinzler , you may be able to work around this with _connection.Open();
var command = _connection.CreateCommand();
command.CommandText = "ALTER SESSION SET QUERY_TAG = \"SOME_TAG\";";
command.ExecuteNonQuery(); |
hi and thank you for submitting this issue, also apologies for the long period without response. this is already available in our JDBC driver (https://docs.snowflake.com/developer-guide/jdbc/jdbc-configure#connection-parameters , actually not only |
Any updates on this? Also, is it possible to track this at the query level i.e. per query? |
no updates unfortunately but will share if there will be available in the future. |
@sfc-gh-dszmolka - how would using "ALTER SESSION" work on per query level if snowflake db connection is singleton? Basically, I want to collect info like user who executed the query, which customer this user belongs to etc. |
PR with the capability in review: #916 |
PR is now merged and will be part of the upcoming April 2024 release cycle, towards the end of the month |
quick update: release was postponed to after the Snowflake Summit 2024; which (the Summit) happens 3-6 June so probably the week after that. |
Will update this thread once more information is known about the next upcoming major release of the .NET driver which will carry this fix. edit: confirming with Product team; release should be available by mid-July 2024 |
functionality released with .NET driver version v4.0.0 in July 2024 |
Issue description
Please add QUERY_TAG to SFSessionParameter enum
Example code
Error log
There is an example in READMD.md file showing you how to enable logging.
Configuration
Driver version:
Dotnet framework and version: E.g. .net framework 4.5.2 or .net standard 2.0
Server version: E.g. 1.90.1
You may get the server version by running a query:
Client OS: E.g. Debian 8.1 (Jessie), Windows 10
The text was updated successfully, but these errors were encountered: