Correct typos, change default output extensions and replace invalid characters from node name - #2
Correct typos, change default output extensions and replace invalid characters from node name#2ghost wants to merge 3 commits into
Conversation
Typo in concentrate option, semi-colons are not accepted in brackets, default extension for grapvhiz files is .gv or .dot.
Grapvhiz does not like dashes in node names, therefore I replace them with underscores
|
|
||
|
|
||
| def write_to_file(self, filename='output.txt'): | ||
| def write_to_file(self, filename='output.gv'): |
There was a problem hiding this comment.
i was using the output.txt to paste into a graphviz renderer. is this change so that you can just render it locally?
There was a problem hiding this comment.
To be honest I cannot recall why I made this change specifically. Probably because .gv is a standard extension for Grapvhiz DOT files. Likely I was using another tool that would pick up .gv files and render them.
There was a problem hiding this comment.
Yep, .gv is the correct Graphviz DOT files. Graphviz is imported, but not sure if it's on the build yet...
There was a problem hiding this comment.
If the output is saved as a .gv file, graphviz library can be used to display it on the screen if using a notebook and can also be used to save it, as a png in this example.
...
raw_entity_relationship_diagram.write_to_file('raw_entity_relationship_diagram.gv')
graph = graphviz.Source.from_file('raw_entity_relationship_diagram.gv')
graph.render('erd_raw', format='png') #Save file
display(graph)| table_end = '\t\t' + '</table>>];' | ||
| self.table_def.append(self.front_matter) | ||
| for col, col_type in self.meta_info: | ||
| col = col.replace("-", "_") |
There was a problem hiding this comment.
HAHAHA! Someone has been playing with AWS Athena, @ba-tno ? ;)
| fontname="Helvetica"; | ||
| nodesep=0.5, | ||
| rankdir="LR", | ||
| concentrate=true, |
No description provided.