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

Command in iceberg docs is broken #4716

Open
petern48 opened this issue Feb 6, 2025 · 0 comments
Open

Command in iceberg docs is broken #4716

petern48 opened this issue Feb 6, 2025 · 0 comments

Comments

@petern48
Copy link

petern48 commented Feb 6, 2025

The previous command assumes that we are in the directory that unzipped the given iceberg_data.zip file.

SELECT count(*)
FROM iceberg_scan('data/iceberg/lineitem_iceberg', allow_moved_paths = true);
┌──────────────┐
│ count_star() │
│    int64     │
├──────────────┤
│        51793 │
└──────────────┘

However, the next command fails from that directory because the file paths in the data start from two directories forward (no data/iceberg part). Also the 02701-1e474dc7-4723-4f8d-a8b3-b5f0454eb7ce.metadata.json does not exist in the zip file.

SELECT count(*)
  FROM iceberg_scan('data/iceberg/lineitem_iceberg/metadata/v1.metadata.json');
IO Error: Cannot open file "lineitem_iceberg/metadata/snap-3776207205136740581-1-cf3d0be5-cf70-453d-ad8f-48fdc412e608.avro": No such file or directory

In order to get the command to work, I need to cd down two directories, and update the .json file to a valid one that exists.

.cd data/iceberg
SELECT count(*)
  FROM iceberg_scan('lineitem_iceberg/metadata/v1.metadata.json');
┌──────────────┐
│ count_star() │
│    int64     │
├──────────────┤
│        60175 │
└──────────────┘
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant