Skip to content

Conversation

@UmeshPatil-1
Copy link

@UmeshPatil-1 UmeshPatil-1 commented Feb 2, 2026

ATLAS-5159
What changes were proposed in this pull request?

Background:
Exporting entities of a parent type (e.g., Referenceable) does not export entities of its child type (e.g., hive_table).
When attempting to export using the parent type with unique attributes, no child entities were returned, leading to incomplete exports.

Root Cause:

The previous implementation of StartEntityFetchByExportRequest did not consistently account for the type hierarchy. Specifically, when fetching by uniqueAttributes/matchType, the logic did not automatically include subtypes, meaning only entities explicitly labeled with the parent type were discovered.

Changes Proposed:

Hierarchical Type Lookup: Updated getEntitiesForMatchTypeUsingUniqueAttributes to identify the AtlasEntityType and automatically include all its subtypes (entityType.getAllSubTypes()) in the search criteria.

Gremlin Binding Expansion: Refactored getBindingsForTypeName to handle comma-separated type names and recursively resolve all subtypes for each provided type. This ensures that a query for a parent type translates into a Gremlin search across the entire inheritance tree.

Enhanced Match Logic:
Improved getEntitiesForMatchTypeType to utilize the expanded type list.

Impact:

Exporting parent types like Referenceable now correctly includes all child entities.
Maintains consistent behavior for all fetch types (FULL, INCREMENTAL, CONNECTED).
Minimal impact on performance; no additional schema changes are required.

How was this patch tested?

Maven Build:- Build Successfull.
Manual testing of export requests with all three fetch types: FULL, INCREMENTAL, CONNECTED.
Verified entity GUIDs are correctly returned for parent types and child entities,Concrete types with unique attributes (hive_table)
Confirmed behavior for concrete types, abstract types, and invalid/misspelled types.
Logs verified query execution, fetch type handling, and error reporting.

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

Successfully merging this pull request may close these issues.

1 participant