Skip to content
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-1356421: Iceberg Table Refresh: Unsupported Exception in Snowflake JDBC Driver #1745

Closed
burriad opened this issue Apr 30, 2024 · 2 comments
Assignees
Labels
invalid question Issue is a usage/other question rather than a bug status-triage_done Initial triage done, will be further handled by the driver team

Comments

@burriad
Copy link

burriad commented Apr 30, 2024

  1. What version of JDBC driver are you using?
    3.15.1

  2. What operating system and processor architecture are you using?
    Windows 10

  3. What version of Java are you using?
    17

  4. 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.

  1. 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: []

  1. Can you set logging to DEBUG and collect the logs?

    https://community.snowflake.com/s/article/How-to-generate-log-file-on-Snowflake-connectors

  2. What is your Snowflake account identifier, if any? (Optional)

SBB.EAP
[email protected]

@burriad burriad added the bug label Apr 30, 2024
@github-actions github-actions bot changed the title Iceberg Table Refresh: Unsupported Exception in Snowflake JDBC Driver SNOW-1356421: Iceberg Table Refresh: Unsupported Exception in Snowflake JDBC Driver Apr 30, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka self-assigned this May 1, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka added the status-triage Issue is under initial triage label May 1, 2024
@sfc-gh-dszmolka
Copy link
Contributor

sfc-gh-dszmolka commented May 1, 2024

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.

@sfc-gh-dszmolka sfc-gh-dszmolka added invalid question Issue is a usage/other question rather than a bug status-triage_done Initial triage done, will be further handled by the driver team and removed bug status-triage Issue is under initial triage labels May 1, 2024
@burriad burriad closed this as completed May 7, 2024
@burriad
Copy link
Author

burriad commented May 7, 2024

With the different Syntax (without IF EXISTS), the query succeeded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid question Issue is a usage/other question rather than a bug status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

No branches or pull requests

2 participants