datnguye/dbterd

[FEAT] Ensure that the order of tables and relationships in the output diagram does not change each time

Closed this issue · 0 comments

Is your feature request related to a problem? Please describe.
We would like to run dbterd on GitHub Actions and add markdown files with mermaid as artifacts to the GitHub repository. However, each time we run dbterd, there is a subtle difference in the output markdown file. The rendered diagram is the same, but the order of the output tables and relationships is different, so essentially the same content is being judged as differing.

Describe the solution you'd like
Ensure ordering of tables and relationships. Perhaps apply a sorted function to the tables and relations in the return value of the parse function.

Describe alternatives you've considered
N/A

Additional context
This is probably due to the fact that the contents of manifest.json output by dbt are not guaranteed to be in order.