Closed colmsnowplow closed 2 years ago
The anticipation here, is that even if we get the -00001 error code, the query had actually been successful so we should continue? You're antipating ending up in the case statement on Line 234 of snowflake_target.go?
What we have seen when we've encountered the error in the wild is that yes, the query was actually successful. But there's no saying that'll be the case every time. Also I don't know if we encounter this error while the query is still running or after it's finished (I suspect it's the latter).
So yes, when we get this error we enter the case statement on line 234 of snowflake_target.go
- where we're basically polling for a result to that specific query, and when we have one we proceed accordingly.
Note though that we can't reproduce this scenario at the moment, at least not easily.
Thanks for giving this a thorough test @adatzer!
Patch release to address an issue where the Snowflake driver returns
-00001:
error - causing a job failure - but the queries were actually successful.The apparent cause of this is an empty response and empty error from the server.
We mitigate this by grabbing the query ID, and using it to poll Snowflake for a genuine result. If that result was success, we proceed with the job. If there was any error, we return that error rather than the one the driver produces.
We also provide the queryID in the error message for all failures from here in, to better enable us to debug similar issues in partnership with Snowflake.