Skip to content

DAGs with common dependencies are drawn wrong #418

@leo-mazzone

Description

@leo-mazzone

Take the example of two models linking the same sources. Currently, one of them is shown as disconnected by dag.draw():

link_ch_dh_new
├── companies_house
└── dedupe_dh
    └── data_hub

link_ch_dh_old

More seriously, it's either a symptom of a divorce between the planned running order and dag.draw(), or it's evidence of a wrong running order.

More generally, the method will struggle if any node is a dependency of more than one other node, e.g. sources A, B, C, linkers AB and BC.

A reasonable solution might need to show repeated nodes, e.g.

AC
  |-A
  |-C
BC
  |-B
  |-C

Which I think means we want to separate explicitly the method to get the running order, and that for showing the DAG's structure precisely. Or maybe we could somehow show differently sources that will be skipped.

This is also an opportunity for showing the running order from top to bottom, like most of our users expect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions