example graphviz based ETL graph

This commit is contained in:
ImreSamu
2016-11-07 15:37:17 +01:00
parent 1b4b6be3fe
commit 29d33dff3c
5 changed files with 111 additions and 1 deletions

21
gen_etl_graph.sh Executable file
View File

@@ -0,0 +1,21 @@
DOT=highway.dot
echo "digraph G
{
rankdir=LR;
" > $DOT
cat ./layers/highway/mapping.yaml | grep "# etldoc:" | sed 's/# etldoc://g' >>$DOT
cat ./layers/highway/types.sql | grep "\-\- etldoc:" | sed 's/-- etldoc://g' >>$DOT
cat ./layers/highway/ne_global_roads.sql | grep "\-\- etldoc:" | sed 's/-- etldoc://g' >>$DOT
cat ./layers/highway/highway.sql | grep "\-\- etldoc:" | sed 's/-- etldoc://g' >>$DOT
echo "
}
" >> $DOT
cat $DOT
dot -Tpng $DOT > layer_highway_etl.png