Area: Product Issues
Sub-Area: Browse Path Organization
Applies to: OSS + Cloud
Issue
Duplicate folders with different case variations appear in the browse sidebar of the search page (for example, both "RAW" and "raw" for the same Snowflake database). In DataHub Cloud with the redesigned navigation, you open that page with the "Discover" button, and the sidebar is titled "Navigate". Assets that should be grouped together appear in separate folders.
You Might Be Asking
- Why do I see both uppercase and lowercase versions of the same database or schema folders?
- Will restoring indices merge the duplicate folders?
- Why does this happen in production but not in staging?
Cause
The duplicates are separate entities. They are not a search index problem.
Snowflake database and schema container keys are built from the database and schema names. When convert_urns_to_lowercase is true (the default), those names are lowercased first. If one run used a different setting, it created its own containers, for example RAW next to raw. Two environments can differ if they ran with different settings at some point.
When GMS builds a dataset's default browse path, it uses the container path if the dataset has one. Otherwise it builds the path from the name in the dataset URN.
Setting convert_urns_to_lowercase: false also logs this warning during ingestion: "Please use convert_urns_to_lowercase: True, otherwise lineage to other sources may not work correctly."
Solution
-
Check the recipe setting. Confirm that every Snowflake recipe for this source uses the same value. The default is
true.
source:
type: snowflake
config:
convert_urns_to_lowercase: true
See the Snowflake source configuration.
-
Decide which folder to keep. Check which case your recipe produces today. The folder for the other case holds the stale entities.
-
Delete the stale entities. Use
datahub delete. It soft-deletes by default, and you can undo a soft delete. Add--hardonly when you want to remove the entities from the database. Use--urn <urn>for one entity.--recursivedeletes all contained entities, and it works only for containers and data platform instances. You can also filter with-p/--platform,-e/--env,--entity-typeand--query. Run a soft delete first. See Deleting metadata. -
Run the ingestion again so the assets you keep are emitted under the consistent setting.
What does not fix this
-
Restore indices. It rebuilds search index documents from the aspects already in primary storage. Its
createDefaultAspectsoption (defaultfalse) only creates default aspects that are missing. It does not change an existingbrowsePathsV2and does not merge folders that differ by case. See Restore indices. -
Stateful ingestion.
stateful_ingestion.remove_stale_metadataalready defaults totrue. It soft-deletes only entities that were in the last successful run of the same pipeline and are missing from the current run. It does not remove entities that predate state tracking or that this pipeline never emitted.