Aims to create an interactive dependancy tree which shows how various nodes of Dataform dependancy tree are connected. At a high level it supports:
Creating dependancy graph with table/view created from current file as root when Load dependancy graph button is clicked on the side panel
Creating dependancy graph by right clicking my_source in $ref{("my_source")} to create dependancy graph with my_source as root
External dependencies
For dependancy tree, I have used my fork of square/dependtree which add colouring functionality to easily identify external data source declarations in the Dataform pipeline. The legends of the graph are drawn uses d3.js library which is a data visualisation library used by dependtree. Searchable drop-downs have been facilitated by select2. All of these libraries have been imported as minified js files where possible ( maybe old fashioned, but works for now ! ).
Limitations
Assumes that names of the table are unique across Dataform project as using table_name.dataset_name could potentially cause clutter in the resulting graph
If user changes the theme to a light / dark them while web panel is open, the text will be hard to read. Will be fixed if the user switches tab and comes back / re-opens to web panel
TODO
[x] feat: load dependencies from a reference
[x] fix(utils): Dependencies when table prefix is used in generateDependancyTreeMetadata
[x] feat(centerpanel): check if treeRoot still exists in dataformTreeMetadata
[x] feat(tree): Colors to indicate tables from different datasets
[x] Refine code to have types
[x] Load tree root from the file for which side panel is loaded
[x] feat: handle edge cases were there is a compilation error etc
[x] fix: when user selects light theme node text is no longer visible as it is hard coded to be white
Aims to create an interactive dependancy tree which shows how various nodes of Dataform dependancy tree are connected. At a high level it supports:
Load dependancy graph
button is clicked on the side panelmy_source
in$ref{("my_source")}
to create dependancy graph withmy_source
as rootExternal dependencies
For dependancy tree, I have used my fork of square/dependtree which add colouring functionality to easily identify external data source declarations in the Dataform pipeline. The legends of the graph are drawn uses d3.js library which is a data visualisation library used by dependtree. Searchable drop-downs have been facilitated by select2. All of these libraries have been imported as minified js files where possible ( maybe old fashioned, but works for now ! ).
Limitations
table_name.dataset_name
could potentially cause clutter in the resulting graphTODO
generateDependancyTreeMetadata