SNOW-1356421: Iceberg Table Refresh: Unsupported Exception in Snowflake JDBC Driver
Closed this issue · 2 comments
-
What version of JDBC driver are you using?
3.15.1 -
What operating system and processor architecture are you using?
Windows 10 -
What version of Java are you using?
17 -
What did you do?
I executed the query
ALTER ICEBERG TABLE btl_timetable_planned_occupancy REFRESH 'efa/btl/timetable_planned_occupancy/metadata/00161-5648ca5c-44d0-4116-8d17-63079f984ac0.metadata.json';
and got an error message.
This is the statement proposed in https://docs.snowflake.com/en/user-guide/tables-iceberg-manage to refresh the metadata in an iceberg table with an external catalog integration in object storage. The tables we're trying to update exist and can be queried in the Snowflake console and the SQL ALTER TABLE statement can be successfully executed in the Snowflake console.
- What did you expect to see?
I expect that the metadata of the Snowflake Iceberg table is updated and I can see the current data. Instead I get the following error message:
Unsupported feature 'ALTER ICEBERG TABLE ... REFRESH/ADD FILES is still a work in progress, debug info: command: ICEBERG_TABLE_REFRESH, table: BTL_TIMETABLE_PLANNED_OCCUPANCY, ifExists: Yes, fullRefresh: No, refreshPath: efa/btl/timetable_planned_occupancy/metadata/00161-5648ca5c-44d0-4116-8d17-63079f984ac0.metadata.json, addFiles: '. Query: ALTER ICEBERG TABLE IF EXISTS btl_timetable_planned_occupancy REFRESH 'efa/btl/timetable_planned_occupancy/metadata/00161-5648ca5c-44d0-4116-8d17-63079f984ac0.metadata.json' Parameters: []
-
Can you set logging to DEBUG and collect the logs?
https://community.snowflake.com/s/article/How-to-generate-log-file-on-Snowflake-connectors
-
What is your Snowflake account identifier, if any? (Optional)
SBB.EAP
adrian.burri@sbb.ch
hi and thank you for submitting this issue - it does not really seem to related to JDBC driver (or any of the Snowflake drivers) so not sure if it's the right place here in this repo but let's see what we can do.
i took a look and saw that there was indeed one single instance of the query
ALTER ICEBERG TABLE <tablename> REFRESH 'path/to/file.metadata.json' --successful
which succeeded, but then all subsequent attempts in the account you specified in the Issue submission looked like this:
ALTER ICEBERG TABLE IF EXISTS <tablename> REFRESH 'path/to/file.metadata.json' --errors out
observe the difference in the SQL syntax.
Can you please try sending the first version of the query (without the IF EXISTS
predicate, as the example shows) from the JDBC driver, and see if it works ? If it does not work even in that format, but it works from Snowsight console or any other Snowflake drivers, let me know please.
Otherwise if you require further help or advice with the Iceberg Tables functionality itself (regardless of the Snowflake driver), do raise a Support Case with us and we'll be happy to assist.
With the different Syntax (without IF EXISTS), the query succeeded.