Skip to content
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

Closed
sandscap-sc opened this issue Aug 15, 2021 · 15 comments
Closed

Add QUERY_TAG to SFSessionParameter enum please #362

sandscap-sc opened this issue Aug 15, 2021 · 15 comments
Assignees
Labels
enhancement The issue is a request for improvement or a new feature parity this feature is supported in other drivers status-fixed_awaiting_release The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector. status-triage_done Initial triage done, will be further handled by the driver team

Comments

@sandscap-sc
Copy link

Issue description

Please add QUERY_TAG to SFSessionParameter enum

Example code

If possible, please enter some example code here to reproduce the issue.

Error log

If you have an error log, please paste it here.

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:

SELECT CURRENT_VERSION();

Client OS: E.g. Debian 8.1 (Jessie), Windows 10

@sfc-gh-kterada sfc-gh-kterada added the enhancement The issue is a request for improvement or a new feature label Sep 23, 2021
@DarthRinzler
Copy link

DarthRinzler commented Mar 24, 2022

Any updates on this? Is there a workaround?

@sfc-gh-hkapre
Copy link

@DarthRinzler Can you provide some detail on the use case you have in mind for this?

@DarthRinzler
Copy link

DarthRinzler commented Mar 24, 2022

@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

@sfc-gh-hkapre
Copy link

Thanks @DarthRinzler. We will evaluate this for Q2 and provide an update once it's confirmed.

@DarthRinzler
Copy link

Much appreciated @sfc-gh-hkapre

@astarche
Copy link

astarche commented Jun 6, 2022

@DarthRinzler , you may be able to work around this with ALTER SESSION. I.e.,

_connection.Open();

var command = _connection.CreateCommand();
command.CommandText = "ALTER SESSION SET QUERY_TAG = \"SOME_TAG\";";
command.ExecuteNonQuery();

@sfc-gh-jfan sfc-gh-jfan reopened this Jul 1, 2022
@github-actions github-actions bot closed this as completed Jul 2, 2022
@sfc-gh-jfan sfc-gh-jfan reopened this Jul 6, 2022
@sfc-gh-dszmolka sfc-gh-dszmolka added status-triage Issue is under initial triage parity this feature is supported in other drivers labels Jun 7, 2023
@sfc-gh-dszmolka
Copy link
Contributor

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 QUERY_TAG but a whole bunch of session parameters) so would be a valid request. we'll take a look.

@sfc-gh-dszmolka sfc-gh-dszmolka removed the status-triage Issue is under initial triage label Jun 7, 2023
@sfc-gh-dszmolka sfc-gh-dszmolka added the status-in_progress Issue is worked on by the driver team label Jun 7, 2023
@sachin-tive
Copy link

Any updates on this? Also, is it possible to track this at the query level i.e. per query?

@sfc-gh-dszmolka
Copy link
Contributor

no updates unfortunately but will share if there will be available in the future.
for query-level tracking, please take a look at the suggestion just above (using ALTER SESSION), you can even combine it with the multi-query statement capability of the driver.

@sachin-tive
Copy link

@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.

@sfc-gh-dszmolka sfc-gh-dszmolka added status-triage_done Initial triage done, will be further handled by the driver team and removed status-in_progress Issue is worked on by the driver team labels Feb 11, 2024
@sfc-gh-jsieminska sfc-gh-jsieminska self-assigned this Apr 5, 2024
@sfc-gh-dszmolka
Copy link
Contributor

PR with the capability in review: #916

@sfc-gh-dszmolka sfc-gh-dszmolka added status-pr_pending_merge A PR is made and is under review status-fixed_awaiting_release The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector. and removed status-pr_pending_merge A PR is made and is under review labels Apr 15, 2024
@sfc-gh-dszmolka
Copy link
Contributor

PR is now merged and will be part of the upcoming April 2024 release cycle, towards the end of the month

@sfc-gh-dszmolka
Copy link
Contributor

quick update: release was postponed to after the Snowflake Summit 2024; which (the Summit) happens 3-6 June so probably the week after that.

@sfc-gh-dszmolka
Copy link
Contributor

sfc-gh-dszmolka commented Jun 24, 2024

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

@sfc-gh-dszmolka
Copy link
Contributor

functionality released with .NET driver version v4.0.0 in July 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is a request for improvement or a new feature parity this feature is supported in other drivers status-fixed_awaiting_release The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector. status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

No branches or pull requests