-
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
SNOW-950923: SnowflakeDbCommand.GetQueryId() returns null on PUT cmd #802
Comments
hi and thank you for raising this issue - also appreciate the code snippet ! reproduced the same issue with the latest (2.1.2 at the time of writing) version of the driver; also observed that We'll take a look. |
this is still under investigation and thank you for bearing with us while this gets sorted ! for the 'PUT command failed' scenario, it will require a bit bigger effort, but for the 'PUT command was successful' scenario, you might be able to get the queryid for the PUT (or GET) command with something like using (var command = connection.CreateCommmand())
{
command.CommandText = "PUT file:///path/to/file.txt @mystage";
var reader = command.ExecuteReader();
// the above is generic DbReader
// but if we convert it to the actual type we can access QueryID
// for succeeded operations
var queryId = ((SnowflakeDbDataReader)reader).GetQueryId();
.. |
It will be available on the command level as well |
PR is #825 |
@sfc-gh-dszmolka Code is ready however it introduces a BCR and will get released along with other bigger breaking changes in Q1. |
hey @sfc-gh-mhofman thanks for the heads-up, this is great news! Do we have any estimation when this could be; together with the regular driver release cycle in February or some other time? |
@sfc-gh-dszmolka worse case March release cc @sfc-gh-knozderko |
@sfc-gh-dszmolka planned for the Feb release |
PR is now merged and will be part of the next release which is imminent. |
fix released with version 3.0.0, closing Issue |
When I Execute a PUT command and then use GetQueryId on the command object which executed - it returns null.
I haven't seen this with any other command.
Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!
What version of .NET driver are you using?
2.1.2
What operating system and processor architecture are you using?
Tested on Mac (M2) and PC (Win11/x64)
What version of .NET framework are you using?
netcore 7.0.12
What did you do?
SnowflakeDbCommand command = new SnowflakeDbCommand(_connection, "PUT file://path/to/file.csv @stage_name");
System.Data.Common.DbDataReader reader = command.ExecuteReader() ;
string queryId = command.GetQueryId(); // this returns null
What did you expect to see?
I expect a valid query Id
Can you set logging to DEBUG and collect the logs?
let me know if this is needed - can try later.
What is your Snowflake account identifier, if any? (Optional)
The text was updated successfully, but these errors were encountered: