Skip to content

Lineage: distinguish DIRECT (data flow) from INDIRECT (filter/join/ordering only) dependencies #35862

Open

Description

@SerPeter

Is your feature request related to a problem? Please describe.

Table-level lineage today draws every upstream dependency the same way. In a dbt project the edges come from depends_on, so a table whose columns end up in the output and a table that is only used in a JOIN condition, WHERE filter, GROUP BY or ORDER BY / QUALIFY look identical in the graph and get the same weight in the layout.

In a layered warehouse (staging → Data Vault → marts) this makes the lineage hard to read. Example from our dbt project, dim_user has four upstream models:

Upstream Column mappings in OpenMetadata Role
sat_user 22 the values of the dimension
bridge_user_team 1 the team key
xref_team 0 only used in a join that picks one team per user
sat_team 0 only used as a tie-breaker in ORDER BY

All four are drawn as equal edges, and because the two "pick-only" tables are also upstream of bridge_user_team, the graph shows a dense diamond. Users read it as "dim_user's data comes from four places" when it comes from two.

These INDIRECT edges are real dependencies and must stay (impact analysis needs them: changing sat_team changes which team is picked). The problem is only that they can't be told apart from data flow.

Describe the solution you'd like

  1. Persist the transformation type. OpenLineage already defines this in its column lineage facet: transformations[].type = DIRECT (IDENTITY, TRANSFORMATION, AGGREGATION) or INDIRECT (FILTER, JOIN, GROUP_BY, SORT, WINDOW, CONDITIONAL). OpenMetadata's OpenLineage API already accepts transformationType (api/lineage/openlineage/openLineageFacets.json), but OpenLineageMapper keeps only transformationDescription (mapped to ColumnLineage.function) and drops the type. Add the type (and subtype) to ColumnLineage in type/entityLineage.json, and an edge-level summary on LineageDetails (e.g. dependencyType: DIRECT | INDIRECT, INDIRECT when the edge has no DIRECT column mapping).
  2. Produce it in the SQL-based lineage paths (dbt, query lineage, view lineage): columns referenced in join/filter/grouping/ordering clauses become INDIRECT mappings, select-list columns DIRECT. collate-sqllineage only reports select-list columns today, so an edge with only INDIRECT use currently has zero column mappings.
  3. Render it in the lineage UI:
    • INDIRECT edges as a dashed (or lighter) line, DIRECT edges solid.
    • Less weight for INDIRECT edges in the automatic layout, so nodes that only influence a table are placed out of the main flow instead of pulling it into a diamond.
    • A toggle in Lineage Config to hide INDIRECT edges, with the default configurable in Settings > Preferences > Lineage.
  4. Impact Analysis: a column or filter for DIRECT / INDIRECT, so "which outputs change if this column changes" and "which outputs could change" can be separated.

Describe alternatives you've considered

  • Edge description via the API after ingestion ("join/filter only"): only visible in the edge detail panel, not in the graph, and has to be re-applied on every ingestion.
  • Attaching a placeholder pipeline to INDIRECT edges so "Pipeline View Mode: Edge" labels them: a misuse of the pipeline entity, and it does not change the layout.
  • Removing INDIRECT edges: loses real dependencies for impact analysis.
  • Building a separate lineage view outside OpenMetadata: works, but splits the catalog experience in two.

Additional context

Pre-submission checklist

  • I searched for duplicate feature requests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ingestionbackendenhancement

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions