fix(assets): use manifest parent_map for accurate lineage#240
Merged
fdelbrayelle merged 3 commits intomainfrom Mar 5, 2026
Merged
fix(assets): use manifest parent_map for accurate lineage#240fdelbrayelle merged 3 commits intomainfrom
fdelbrayelle merged 3 commits intomainfrom
Conversation
Use the manifest-level parent_map (the canonical DAG) to resolve asset dependencies instead of node-level depends_on.nodes which can include extra edges not reflecting the real dbt DAG structure.
Contributor
Member
Member
Author
|
Here is what I have in the DB for assets: [
{
"key": "fde_memory.main.int_customer_orders",
"value": {
"id": "memory.main.int_customer_orders",
"name": "int_customer_orders",
"type": "io.kestra.plugin.ee.assets.Table",
"schema": "main",
"system": "duckdb",
"created": "2026-03-04T14:55:24.792885Z",
"deleted": false,
"updated": "2026-03-04T14:55:24.962814Z",
"database": "memory",
"metadata": {
"name": "int_customer_orders",
"schema": "main",
"system": "duckdb",
"database": "memory"
},
"tenantId": "fde"
},
"tenant_id": "fde",
"namespace": null,
"id": "memory.main.int_customer_orders",
"type": "io.kestra.plugin.ee.assets.Table",
"display_name": null,
"created": "2026-03-04 14:55:24.792885 +00:00",
"updated": "2026-03-04 14:55:24.962814 +00:00",
"deleted": false,
"fulltext": null
},
{
"key": "fde_memory.main.my_second_dbt_model",
"value": {
"id": "memory.main.my_second_dbt_model",
"name": "my_second_dbt_model",
"type": "io.kestra.plugin.ee.assets.Table",
"schema": "main",
"system": "duckdb",
"created": "2026-03-04T14:55:24.792922Z",
"deleted": false,
"updated": "2026-03-04T14:55:24.985039Z",
"database": "memory",
"metadata": {
"name": "my_second_dbt_model",
"schema": "main",
"system": "duckdb",
"database": "memory"
},
"tenantId": "fde"
},
"tenant_id": "fde",
"namespace": null,
"id": "memory.main.my_second_dbt_model",
"type": "io.kestra.plugin.ee.assets.Table",
"display_name": null,
"created": "2026-03-04 14:55:24.792922 +00:00",
"updated": "2026-03-04 14:55:24.985039 +00:00",
"deleted": false,
"fulltext": null
},
{
"key": "fde_memory.main.stg_customers",
"value": {
"id": "memory.main.stg_customers",
"name": "stg_customers",
"type": "io.kestra.plugin.ee.assets.Table",
"schema": "main",
"system": "duckdb",
"created": "2026-03-04T14:55:24.792930Z",
"deleted": false,
"updated": "2026-03-04T14:55:25.004978Z",
"database": "memory",
"metadata": {
"name": "stg_customers",
"schema": "main",
"system": "duckdb",
"database": "memory"
},
"tenantId": "fde"
},
"tenant_id": "fde",
"namespace": null,
"id": "memory.main.stg_customers",
"type": "io.kestra.plugin.ee.assets.Table",
"display_name": null,
"created": "2026-03-04 14:55:24.792930 +00:00",
"updated": "2026-03-04 14:55:25.004978 +00:00",
"deleted": false,
"fulltext": null
},
{
"key": "fde_memory.main.int_order_payments",
"value": {
"id": "memory.main.int_order_payments",
"name": "int_order_payments",
"type": "io.kestra.plugin.ee.assets.Table",
"schema": "main",
"system": "duckdb",
"created": "2026-03-04T14:55:24.792950Z",
"deleted": false,
"updated": "2026-03-04T14:55:25.025884Z",
"database": "memory",
"metadata": {
"name": "int_order_payments",
"schema": "main",
"system": "duckdb",
"database": "memory"
},
"tenantId": "fde"
},
"tenant_id": "fde",
"namespace": null,
"id": "memory.main.int_order_payments",
"type": "io.kestra.plugin.ee.assets.Table",
"display_name": null,
"created": "2026-03-04 14:55:24.792950 +00:00",
"updated": "2026-03-04 14:55:25.025884 +00:00",
"deleted": false,
"fulltext": null
},
{
"key": "fde_memory.main.fct_revenue_by_customer",
"value": {
"id": "memory.main.fct_revenue_by_customer",
"name": "fct_revenue_by_customer",
"type": "io.kestra.plugin.ee.assets.Table",
"schema": "main",
"system": "duckdb",
"created": "2026-03-04T14:55:24.792968Z",
"deleted": false,
"updated": "2026-03-04T14:55:25.044774Z",
"database": "memory",
"metadata": {
"name": "fct_revenue_by_customer",
"schema": "main",
"system": "duckdb",
"database": "memory"
},
"tenantId": "fde"
},
"tenant_id": "fde",
"namespace": null,
"id": "memory.main.fct_revenue_by_customer",
"type": "io.kestra.plugin.ee.assets.Table",
"display_name": null,
"created": "2026-03-04 14:55:24.792968 +00:00",
"updated": "2026-03-04 14:55:25.044774 +00:00",
"deleted": false,
"fulltext": null
},
{
"key": "fde_memory.main.stg_payments",
"value": {
"id": "memory.main.stg_payments",
"name": "stg_payments",
"type": "io.kestra.plugin.ee.assets.Table",
"schema": "main",
"system": "duckdb",
"created": "2026-03-04T14:55:24.793104Z",
"deleted": false,
"updated": "2026-03-04T14:55:25.066339Z",
"database": "memory",
"metadata": {
"name": "stg_payments",
"schema": "main",
"system": "duckdb",
"database": "memory"
},
"tenantId": "fde"
},
"tenant_id": "fde",
"namespace": null,
"id": "memory.main.stg_payments",
"type": "io.kestra.plugin.ee.assets.Table",
"display_name": null,
"created": "2026-03-04 14:55:24.793104 +00:00",
"updated": "2026-03-04 14:55:25.066339 +00:00",
"deleted": false,
"fulltext": null
},
{
"key": "fde_memory.main.fct_customer_summary",
"value": {
"id": "memory.main.fct_customer_summary",
"name": "fct_customer_summary",
"type": "io.kestra.plugin.ee.assets.Table",
"schema": "main",
"system": "duckdb",
"created": "2026-03-04T14:55:24.793126Z",
"deleted": false,
"updated": "2026-03-04T14:55:25.091688Z",
"database": "memory",
"metadata": {
"name": "fct_customer_summary",
"schema": "main",
"system": "duckdb",
"database": "memory"
},
"tenantId": "fde"
},
"tenant_id": "fde",
"namespace": null,
"id": "memory.main.fct_customer_summary",
"type": "io.kestra.plugin.ee.assets.Table",
"display_name": null,
"created": "2026-03-04 14:55:24.793126 +00:00",
"updated": "2026-03-04 14:55:25.091688 +00:00",
"deleted": false,
"fulltext": null
},
{
"key": "fde_memory.main.int_daily_revenue",
"value": {
"id": "memory.main.int_daily_revenue",
"name": "int_daily_revenue",
"type": "io.kestra.plugin.ee.assets.Table",
"schema": "main",
"system": "duckdb",
"created": "2026-03-04T14:55:24.793142Z",
"deleted": false,
"updated": "2026-03-04T14:55:25.115897Z",
"database": "memory",
"metadata": {
"name": "int_daily_revenue",
"schema": "main",
"system": "duckdb",
"database": "memory"
},
"tenantId": "fde"
},
"tenant_id": "fde",
"namespace": null,
"id": "memory.main.int_daily_revenue",
"type": "io.kestra.plugin.ee.assets.Table",
"display_name": null,
"created": "2026-03-04 14:55:24.793142 +00:00",
"updated": "2026-03-04 14:55:25.115897 +00:00",
"deleted": false,
"fulltext": null
},
{
"key": "fde_memory.main.my_first_dbt_model",
"value": {
"id": "memory.main.my_first_dbt_model",
"name": "my_first_dbt_model",
"type": "io.kestra.core.models.assets.External",
"schema": "main",
"system": "duckdb",
"created": "2026-03-04T14:55:24.793149Z",
"deleted": false,
"updated": "2026-03-04T14:55:25.143509Z",
"database": "memory",
"metadata": {
"name": "my_first_dbt_model",
"schema": "main",
"system": "duckdb",
"database": "memory"
},
"tenantId": "fde"
},
"tenant_id": "fde",
"namespace": null,
"id": "memory.main.my_first_dbt_model",
"type": "io.kestra.core.models.assets.External",
"display_name": null,
"created": "2026-03-04 14:55:24.793149 +00:00",
"updated": "2026-03-04 14:55:25.143509 +00:00",
"deleted": false,
"fulltext": null
},
{
"key": "fde_memory.main.stg_orders",
"value": {
"id": "memory.main.stg_orders",
"name": "stg_orders",
"type": "io.kestra.core.models.assets.External",
"schema": "main",
"system": "duckdb",
"created": "2026-03-04T14:55:24.793153Z",
"deleted": false,
"updated": "2026-03-04T14:55:25.169004Z",
"database": "memory",
"metadata": {
"name": "stg_orders",
"schema": "main",
"system": "duckdb",
"database": "memory"
},
"tenantId": "fde"
},
"tenant_id": "fde",
"namespace": null,
"id": "memory.main.stg_orders",
"type": "io.kestra.core.models.assets.External",
"display_name": null,
"created": "2026-03-04 14:55:24.793153 +00:00",
"updated": "2026-03-04 14:55:25.169004 +00:00",
"deleted": false,
"fulltext": null
}
]And for asset_lineage_events: [
{
"key": "3u6NNEC1zDzar3Xh6NqFEO",
"value": {
"uid": "3u6NNEC1zDzar3Xh6NqFEO",
"state": "SUCCESS",
"flowId": "dbt_build_duckdb",
"inputs": [
{
"id": "memory.main.stg_customers",
"type": "io.kestra.plugin.ee.assets.Table",
"tenantId": "fde"
},
{
"id": "memory.main.stg_orders",
"type": "io.kestra.plugin.ee.assets.Table",
"tenantId": "fde"
},
{
"id": "memory.main.my_first_dbt_model",
"type": "io.kestra.plugin.ee.assets.Table",
"tenantId": "fde"
},
{
"id": "memory.main.stg_orders",
"type": "io.kestra.plugin.ee.assets.Table",
"tenantId": "fde"
},
{
"id": "memory.main.stg_payments",
"type": "io.kestra.plugin.ee.assets.Table",
"tenantId": "fde"
},
{
"id": "memory.main.fct_customer_summary",
"type": "io.kestra.plugin.ee.assets.Table",
"tenantId": "fde"
},
{
"id": "memory.main.int_daily_revenue",
"type": "io.kestra.plugin.ee.assets.Table",
"tenantId": "fde"
},
{
"id": "memory.main.int_customer_orders",
"type": "io.kestra.plugin.ee.assets.Table",
"tenantId": "fde"
},
{
"id": "memory.main.int_order_payments",
"type": "io.kestra.plugin.ee.assets.Table",
"tenantId": "fde"
},
{
"id": "memory.main.stg_orders",
"type": "io.kestra.plugin.ee.assets.Table",
"tenantId": "fde"
},
{
"id": "memory.main.stg_payments",
"type": "io.kestra.plugin.ee.assets.Table",
"tenantId": "fde"
}
],
"taskId": "dbt_build",
"created": "2026-03-04T14:55:24.866545Z",
"endDate": "2026-03-04T14:55:24.841278Z",
"outputs": [
{
"id": "memory.main.int_customer_orders",
"type": "io.kestra.plugin.ee.assets.Table",
"tenantId": "fde"
},
{
"id": "memory.main.my_second_dbt_model",
"type": "io.kestra.plugin.ee.assets.Table",
"tenantId": "fde"
},
{
"id": "memory.main.stg_customers",
"type": "io.kestra.plugin.ee.assets.Table",
"tenantId": "fde"
},
{
"id": "memory.main.int_order_payments",
"type": "io.kestra.plugin.ee.assets.Table",
"tenantId": "fde"
},
{
"id": "memory.main.fct_revenue_by_customer",
"type": "io.kestra.plugin.ee.assets.Table",
"tenantId": "fde"
},
{
"id": "memory.main.stg_payments",
"type": "io.kestra.plugin.ee.assets.Table",
"tenantId": "fde"
},
{
"id": "memory.main.fct_customer_summary",
"type": "io.kestra.plugin.ee.assets.Table",
"tenantId": "fde"
},
{
"id": "memory.main.int_daily_revenue",
"type": "io.kestra.plugin.ee.assets.Table",
"tenantId": "fde"
},
{
"id": "memory.main.my_first_dbt_model",
"type": "io.kestra.plugin.ee.assets.Table",
"tenantId": "fde"
},
{
"id": "memory.main.stg_orders",
"type": "io.kestra.plugin.ee.assets.Table",
"tenantId": "fde"
}
],
"tenantId": "fde",
"namespace": "acme.team",
"startDate": "2026-03-04T14:54:59.164350Z",
"taskRunId": "3eObZMTDCL4DeGNVe110hD",
"executionId": "11DXfweOmd0PYlH0N9w4q0",
"flowRevision": 1
},
"tenant_id": "fde",
"namespace": "acme.team",
"flow_id": "dbt_build_duckdb",
"flow_revision": 1,
"execution_id": "11DXfweOmd0PYlH0N9w4q0",
"task_id": "dbt_build",
"task_run_id": "3eObZMTDCL4DeGNVe110hD",
"created": "2026-03-04 14:55:24.866545 +00:00"
}
] |
Member
Author
|
🗒️ Following meeting with @Ben8t & @brian-mulier-p. This PR can be merged because it relies on parent instead of depends of but next steps may be:
All of this should be discussed again in a discovery phase before the next cycle with @kestra-io/products. |
Malaydewangan09
approved these changes
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
parent_map(the canonical DAG representation) to resolve asset dependencies instead of node-leveldepends_on.nodes, which can include extra edges not reflecting the real dbt DAG structuredepends_on.nodesfor older manifests that don't includeparent_mapparentMapfield to theManifestmodelTest plan
parent_mapdata and still passshouldUseParentMapForLineage) verifiesparent_maptakes precedence overdepends_on.nodeswhen they differFixes #239