Skip to content

ATLAS-4889: Incremental export : When an entity has tag propagated an… - #399

Open
chaitalicod wants to merge 2 commits into
apache:masterfrom
chaitalicod:ATLAS-4889
Open

ATLAS-4889: Incremental export : When an entity has tag propagated an…#399
chaitalicod wants to merge 2 commits into
apache:masterfrom
chaitalicod:ATLAS-4889

Conversation

@chaitalicod

@chaitalicod chaitalicod commented Jul 14, 2025

Copy link
Copy Markdown
Contributor

…d is exported , the tag is not propagated to it in the export.

What changes were proposed in this pull request?

STEPS TO REPRODUCE:

Create table1
Create lineage CTAS tables of depth 10 ( t1 -> t2 -> t3 ..... t10)
Associate tag tag1 to table1
Export table table10
Import the zip
CURRENT BEHAVIOUR:

table10 doesn't have the tag associated to the it since the "entityGUID" is of table1's and table1 is not exported

EXPECTED BEHAVIOUR:

table10 should have tag1 exported

Proposed solution:
While exported we will fetch lineage from table10 backtracking till table1 or corresponding parent
On import user will have child as well as entire lineage till parent which will not break current logic
-Tag is propagated to child on import only if parent is present

How was this patch tested?

Combinations of Tag propagation,Blocktagpropagation feature
Tested with below lineage where multiple incoming edges are present

Screenshot from 2025-07-14 16-58-23

Comment thread repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java Outdated
Comment thread repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java Outdated
Comment thread repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java Outdated
Comment thread repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java Outdated
@chaitalicod
chaitalicod force-pushed the ATLAS-4889 branch 2 times, most recently from 467776e to ba999c3 Compare July 18, 2025 05:12
@chaitalicod
chaitalicod force-pushed the ATLAS-4889 branch 10 times, most recently from 0741f29 to 3723718 Compare November 12, 2025 12:41
…nd is exported , the tag is not propagated to it in the export.
@chaitalicod
chaitalicod requested a review from rkundam June 24, 2026 07:09
if (CollectionUtils.isNotEmpty(classifications)) {
for (AtlasClassification classification : classifications) {
String classificationName = classification.getTypeName();
boolean isProcess = relationshipAttributesExtractor.isLineageType(entityTypeName);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 466 to 469 can be moved out of for loop

adjacentVertex = StringUtils.equals(outVertex.getIdForDisplay(), entityVertex.getIdForDisplay()) ? inVertex : outVertex;
String adjacentGuid = getGuid(adjacentVertex);
boolean isPropagated = false;
propagateClassificationVertices = getClassificationVertices(inVertex, outVertex, isProcess, true, classificationName);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code in lines 477–485 is redundant with the code in lines 487–496. Consider extracting the shared logic into a single helper method.

context.newAddedGuids.add(adjacentGuid);
}
if (!context.sink.guids.contains(adjacentGuid)) {
context.addToSink(entityGraphRetriever.toAtlasEntityWithExtInfo(adjacentGuid));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it necessary to exportTypeProcessor.addTypes before addToSink

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.

3 participants