Right now I am attempting to download staged files from Snowflake that are in an Internal Stage of a specific table, specifically <Database>.<Schema>.<My_table>
. The logic would follow and according to the documentation, my GET command should look like GET @%My_table My_Download_Location
. The problem is, for some reason the Java JDBC driver see this and when it tries to execute the query via a JDBCTemplate, it gets transformed into '<Database>.<Schema>."%<My_table>"'
and then the query fails due to this location not actually existing since that name is invalid
I have tried swapping this to the downloadStream
stream option that is listed in the Snowflake JDBC API Documents and the same result happens, the name of the internal stage is expanded in the same way as above that it results in the query failing.
I have also tried "GET @" + Database + "." + Schema + "."%MyTable" My_download_location";
which also resulted in the same thing.
For some reason, the driver, or maybe its the JDBC template cannot correctly translate the @%My_table
into the internal stage, but instead try to change it to the table name, which I think would work anyways, but I am not sure. Looking for any help or advice from someone who may have encountered the same issue
Chandler Todd is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.