Closed sfc-gh-agoldberg closed 9 months ago
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 GET
command is similarly affected, not only PUT
.
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
@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)