You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: legend-engine-xts-analytics/legend-engine-xts-analytics-lineage/legend-engine-xt-analytics-lineage-pure/src/main/resources/core_analytics_lineage/fullAnalytics.pure
+36-5Lines changed: 36 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -168,10 +168,41 @@ function meta::analytics::lineage::getLineageInputFromFunctionDefinition(f:Funct
168
168
);
169
169
}
170
170
171
+
//TODO: remove once backward comaptibility is sorted
172
+
function meta::analytics::lineage::computeLineageLegacy(f:FunctionDefinition<Any>[1], m:Mapping[1], r:Runtime[0..1], extensions:meta::pure::extension::Extension[*], config: FunctionAnalyticsConfig[1]):FunctionAnalytics[1]
173
+
{
174
+
let mappings = if($r->isEmpty(), |$m, |$m->concatenate(getMappingsFromRuntime($r->toOne())));
175
+
let modelToModelMappings = $mappings->init();
176
+
177
+
let sourceMapping = $mappings->last()->toOne();
178
+
let funcBody = $f.expressionSequence->evaluateAndDeactivate();
179
+
let updatedFuncBody = $funcBody->map(e|$e->meta::pure::lineage::analytics::inlineQualifiedProperties(newMap([]->cast(@Pair<VariableExpression, ValueSpecification>), VariableExpression->classPropertyByName('name')->cast(@Property<VariableExpression,String|1>)), $f->openVariableValues(), $extensions));
180
+
let propertyTrees = $updatedFuncBody->map(e|$e->buildMultiLevelPropertyTrees($modelToModelMappings, $extensions));
181
+
182
+
let combinedTrees = if( $propertyTrees->size()>1,|$propertyTrees->first()->toOne()->findAndAddChildrenAtTheEnd([],$propertyTrees->tail()),|$propertyTrees->toOne());
183
+
184
+
let reprocessedFuncBody = if($modelToModelMappings->isEmpty() && $mappings->size() == 1,
functionTrees = ^PropertyPathTree(display='root', value='root'), // Assuming that in the simple case, there are no model joins and hence no property trees
Copy file name to clipboardExpand all lines: legend-engine-xts-analytics/legend-engine-xts-analytics-search/legend-engine-xt-analytics-search-pure/src/main/resources/core_analytics_search/trans.pure
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -241,7 +241,7 @@ function meta::analytics::search::transformation::service::buildDatabaseColumnDo
241
241
relationTree = false,
242
242
reportLineage = true
243
243
);
244
-
let allLineage = $funcDefinition->meta::analytics::lineage::computeLineage($mapping, $runtime, meta::analytics::search::transformation::getExtensions(), $lineageConfig);
244
+
let allLineage = $funcDefinition->meta::analytics::lineage::computeLineageLegacy($mapping, $runtime, meta::analytics::search::transformation::getExtensions(), $lineageConfig);
245
245
let columnLineage = $allLineage.reportLineage->meta::analytics::lineage::transformColumns();
0 commit comments