Area: Product Issues
Sub-Area: Search & Browse / Search Index Consistency
Applies to: OSS + Cloud
Issue
A dataset (for example a BigQuery table) opens when you go to its URN directly. Its container, status and browsePathsV2 aspects are correct. But it does not show in its parent container's Contents tab. Running ingestion again does not fix it.
A second, related symptom: a dbt model and its warehouse table show as two separate entities instead of one combined (sibling) entity, while other tables in the same container combine correctly.
Error Messages
-
User is unauthorized to restore indices.(returned with HTTP 403 by the Rest.li restore indices action, which thedatahub check restore-indicesCLI command calls) - An HTTP 403 with an empty body from
POST /openapi/operations/elasticSearch/restoreIndices -
The platform_instance was removed on September 2025, please remove it from your recipe.(a warning from the BigQuery source when its recipe setsplatform_instance)
You Might Be Asking
- Why does an entity open by URN but not show in its container's Contents tab?
- Why didn't running ingestion again fix it?
- How do I re-index one entity?
- Why does
restoreIndicesreturn 403? - Why is my dbt model showing as a separate entity instead of combining with its BigQuery table?
Cause
The entity page reads aspects from the primary database. The container Contents tab is a search with a fixed container filter, so it reads the search index (Elasticsearch or OpenSearch). If the search document for one entity is stale or missing, the entity page works but the Contents tab does not list it.
Running ingestion again does not repair the search document. When ingestion writes an aspect with the same value it already has, DataHub treats the write as a no-op and, by default, does not send a change event. The search index only updates from change events, so the stale document stays.
The dbt symptom has a different cause. A dbt model and its warehouse table combine only when the warehouse URN that the dbt source builds matches the URN that the warehouse source builds exactly. If they differ, DataHub still writes a siblings aspect, but it pairs the dbt model with the URN the dbt source built. The dbt source creates an entity at that URN itself (it writes lineage to it), and the warehouse source never ingests it. The real table stays separate. Re-indexing does not fix this, because the wrong pairing is stored in the database. The index only copies it.
Solution
Issue 1: Entity missing from the container's Contents tab
-
Confirm the aspects in the database are correct. Use the DataHub CLI:
datahub get --urn "<dataset-urn>" -a container -a status -a browsePathsV2Check that
container.containeris the parent container's URN,status.removedisfalse, andbrowsePathsV2.pathlists the parent containers in order. Ifstatus.removedistrue, the entity is soft-deleted, and that is why it is hidden; re-indexing does not change that. See thegetcommand in the DataHub CLI docs. -
Re-index the entity from the database. Either command reads every aspect of the entity from the database and sends it to the search and graph indices again.
With the CLI:
datahub check restore-indices --urn "<dataset-urn>"For many URNs, put one URN per line in a file and run
datahub check restore-indices --file ./urns.txt.With the OpenAPI endpoint, which takes a JSON list of URNs:
curl -X POST '<gms-url>/openapi/operations/elasticSearch/restoreIndices' \ -H "Authorization: Bearer <token>" \ -H 'Content-Type: application/json' \ -d '["<dataset-urn>"]'For DataHub Cloud,
<gms-url>ishttps://<your-company>.acryl.io/gms. The response is a list of results with fields such asrowsMigrated,lastUrnandlastAspect. You can add?aspectNames=containerto the OpenAPI call, or--aspect containerto the CLI command, to re-index only one aspect.See Search and Graph Reindexing for both APIs.
-
Reload the container's Contents tab and check that the entity is listed.
Who can run restore indices
- The CLI command calls the Rest.li action, which requires the Restore Indices API privilege.
- The OpenAPI endpoint accepts either the Restore Indices API privilege or the Manage System Operations privilege.
- The default Admin role has both privileges. The Roles page lists Restore Indices API as an Admin privilege in both DataHub Core and DataHub Cloud. Use a token from a user with the Admin role, or grant the privilege in a platform policy. See the System Management privileges in the Policies Guide.
- If the token's user does not have the privilege, the call returns 403.
- On DataHub Cloud, if the call returns a 403 or another error, contact DataHub Support. Include the affected URNs and the error you got.
If many entities are missing
The restore indices APIs run inside GMS and suit restores of fewer than about 2,000 aspects. For a larger restore on a self-hosted deployment, run the RestoreIndices upgrade job instead, as described in Search and Graph Reindexing. On DataHub Cloud, contact DataHub Support. Include the container URN and a few of the affected entity URNs.
Issue 2: dbt model and warehouse table showing as separate entities
The dbt source builds the warehouse URN from target_platform, target_platform_instance, env and convert_urns_to_lowercase in the dbt recipe. Each must produce the same URN the warehouse source produces.
-
Find the mismatch. Run:
datahub get --urn "<dbt-model-urn>" -a siblingsThe
siblingslist shows the warehouse URN dbt paired the model with. Open the real warehouse table and copy its URN. Compare the two. A difference in platform instance, env or casing is the cause. -
Match the platform instance.
- For BigQuery, leave
target_platform_instanceunset in the dbt recipe. BigQuery dataset URNs do not contain a platform instance. The BigQuery source dropsplatform_instancefrom its recipe and logs the warning shown in Error Messages. - For other warehouses (for example Snowflake or Redshift), set
target_platform_instancein the dbt recipe to the same value asplatform_instancein the warehouse recipe. If the warehouse recipe has noplatform_instance, leavetarget_platform_instanceunset.
- For BigQuery, leave
-
Match
env. Both recipes default toPROD. If you changed it in one recipe, use the same value in the other. -
Match the casing. The dbt source defaults
convert_urns_to_lowercasetotrue. The BigQuery source defaults it tofalse. If your BigQuery project, dataset or table names contain uppercase letters, setconvert_urns_to_lowercase: falsein the dbt recipe so the URNs match:source: type: dbt config: target_platform: bigquery convert_urns_to_lowercase: false # manifest_path, catalog_path and other optionsChange the dbt recipe to match the warehouse. Do not change
convert_urns_to_lowercaseon a warehouse recipe that has already ingested data. The value is part of each dataset URN. Changing it re-keys every dataset with uppercase letters in its name. With stateful ingestion, the next run soft deletes the old URNs as stale; without it, you get duplicates. Documentation, tags, owners and glossary terms added in the UI stay on the old entities. The same applies to dbt entities when you change the dbt recipe's value, so plan for it. -
Run the warehouse ingestion, then the dbt ingestion. Then run the
datahub getcommand from step 1 again. If thesiblingslist now holds the real table's URN, the model and table show as one entity. -
Fix a stale pairing. With the default
dbt_is_primary_sibling: true, DataHub does not replace asiblingsaspect that already exists. Atarget_platform_instancechange does not change the dbt model's URN, so after that fix the model keeps its oldsiblingsaspect and stays paired with the wrong URN, however many times you run ingestion. Fix the pairing with a patch, which changes only the listed siblings:from datahub.ingestion.graph.client import DataHubGraph, DatahubClientConfig from datahub.specific.dataset import DatasetPatchBuilder dbt_urn = "<dbt-model-urn>" wrong_urn = "<warehouse-urn-dbt-paired-the-model-with>" table_urn = "<real-warehouse-table-urn>" graph = DataHubGraph(DatahubClientConfig(server="<gms-url>", token="<token>")) patches = [ DatasetPatchBuilder(dbt_urn) .remove_sibling(wrong_urn) .add_sibling(table_urn, primary=True), DatasetPatchBuilder(table_urn).add_sibling(dbt_urn), DatasetPatchBuilder(wrong_urn).remove_sibling(dbt_urn), ] for patch in patches: for mcp in patch.build(): graph.emit_mcp(mcp)This keeps the dbt model as the primary sibling, which is the default. The entity at the wrong URN stays in DataHub. To hide it, soft delete it with
datahub delete --urn "<warehouse-urn-dbt-paired-the-model-with>".
See the target_platform_instance, convert_urns_to_lowercase and dbt_is_primary_sibling options in the dbt source config details and the BigQuery source.
Related Documentation
Tags: elasticsearch, search-index, container-contents, missing-entity, restore-indices, dbt-siblings, bigquery, convert-urns-to-lowercase