A tool to analyze SQL queries and generate data flow diagrams.
- Python 3.7+
- Graphviz (system dependency)
-
Install Graphviz on your system:
- Windows: Download from Graphviz Downloads
- Linux:
sudo apt-get install graphviz - macOS:
brew install graphviz
-
Install Python dependencies:
pip install -r requirements.txtpython -m sql_flow_analyzer analyze --sql-file path/to/your/queries.sql --output diagram.pngThe tool will:
- Parse the SQL queries
- Extract table relationships and data flow
- Generate a visual diagram showing how data moves between tables
The repository includes example SQL queries in the examples directory. Try them out:
python -m sql_flow_analyzer analyze --sql-file examples/sample_queries.sql --output flow.png