Area: API Issues
Sub-Area: Iceberg REST Catalog
Applies to: OSS + Cloud
Issue
An Iceberg view shows in the DataHub UI, but a load request for it through the DataHub Iceberg REST Catalog (IRC) returns 404 Not Found. Other views in the same warehouse work. You also can't create a new view with the same name.
The failing request looks like this:
GET https://<your-instance>.acryl.io/gms/iceberg/v1/<warehouse>/namespaces/<namespace>/views/<view_name>
On self-hosted DataHub the path is http://<gms-host>:<gms-port>/iceberg/v1/....
You Might Be Asking
- Why does my Iceberg view show in the DataHub UI but return 404 from the IRC?
- How do I remove the broken view so I can create it again?
- Can I drop the view through the IRC when its metadata file is gone?
Cause
DataHub keeps two records for every view it manages through the IRC:
- A dataset. Its URN has the form
urn:li:dataset:(urn:li:dataPlatform:iceberg,<warehouse>.<generated-uuid>,PROD). DataHub generates the UUID when it creates the view, so it's different for every view. The dataset'sicebergCatalogInfoaspect holdsmetadataPointer, the full path of the view's current metadata JSON file in S3. - A platform resource,
urn:li:platformResource:iceberg.<warehouse>.<namespace>.<view_name>. It maps the view name to the dataset URN.
When you load a view, DataHub looks up both records and then reads the file at metadataPointer from S3. If something outside DataHub deleted that file (an S3 lifecycle rule, a cleanup script, a manual delete), the read fails and the IRC returns 404. The UI still shows the view because both records are still in DataHub.
The name stays taken. Creating a view registers a new platform resource with the same URN, and that fails while the old one exists.
Solution
-
Confirm the metadata file is missing.
Get the dataset URN from the platform resource:
datahub get --urn "urn:li:platformResource:iceberg.<warehouse>.<namespace>.<view_name>" --aspect platformResourceInfoThe
primaryKeyvalue is the dataset URN. You can also copy it from the view's page in the UI. Then read the metadata pointer:datahub get --urn "<dataset-urn>" --aspect icebergCatalogInfoCheck whether the S3 object at
metadataPointerexists. If it doesn't, the view is orphaned. -
Drop the view through the IRC.
curl -X DELETE \ "https://<your-instance>.acryl.io/gms/iceberg/v1/<warehouse>/namespaces/<namespace>/views/<view_name>" \ -H "Authorization: Bearer <your-api-token>"A drop doesn't read the S3 metadata file, so it works when the file is gone. It hard deletes both records: the dataset and the platform resource. You need the Manage Views privilege on the warehouse. See Security and Permissions.
-
If you can't use the IRC drop, hard delete both records with the CLI.
datahub delete --urn "<dataset-urn>" --hard datahub delete --urn "urn:li:platformResource:iceberg.<warehouse>.<namespace>.<view_name>" --hardDelete both. If you delete only the dataset, the platform resource still holds the name and creating the view fails. A hard delete removes all aspects of the entity and you can't undo it. See Removing Metadata from DataHub.
-
Create the view again from your Iceberg client through the IRC. DataHub writes a new metadata file to S3 and registers a new dataset with a new UUID.
-
Find out what deleted the metadata file. Check S3 lifecycle rules, cleanup jobs and other pipelines that write to the warehouse's data root. Keep them away from the paths DataHub uses for IRC metadata, or the same thing happens again.
On DataHub Cloud, if you can't run these steps yourself, contact DataHub Support.