Lineage Visualization
FlowScope visualizes SQL lineage as an interactive graph. This guide explains how to read the graph, understand different node types, and navigate complex lineage structures.
Graph Overview
Section titled “Graph Overview”The lineage graph shows data flow from left to right:
- Source tables appear on the left
- Intermediate transformations (CTEs, subqueries) in the middle
- Target tables or output on the right
- Edges connect nodes showing data flow direction
View Modes
Section titled “View Modes”FlowScope offers multiple view modes for different analysis needs:
Table-Level View
Section titled “Table-Level View”Shows relationships between tables without column details. Best for:
- Understanding high-level data flow
- Viewing large queries with many tables
- Quick impact analysis
Column-Level View
Section titled “Column-Level View”Shows how individual columns flow through transformations. Best for:
- Tracing specific column origins
- Understanding aggregations and calculations
- Detailed impact analysis
Hybrid View
Section titled “Hybrid View”Combines table and column views—tables shown with expandable column sections. Best for:
- Exploring lineage at both levels
- Starting high-level then drilling down
Script View
Section titled “Script View”Groups lineage by SQL statement or file. Best for:
- Multi-file project analysis
- Understanding execution order
- File-level impact analysis
Node Types
Section titled “Node Types”Table Nodes
Section titled “Table Nodes”Represent database tables:
- Blue - Source tables (read from)
- Green - Target tables (written to)
- Gray - External/unknown tables
Table nodes display:
- Table name
- Column list (in column-level view)
- Row count (if available from schema)
CTE Nodes
Section titled “CTE Nodes”Represent Common Table Expressions:
- Shown as intermediate nodes
- Can be hidden with “Hide CTEs” toggle
- Edges bypass hidden CTEs to show direct lineage
Output Nodes
Section titled “Output Nodes”Represent query results:
- Appear for SELECT statements without target table
- Show final column list
- Named as “Query Result” or custom alias
Column Node Details
Section titled “Column Node Details”In column-level view, each column shows:
| Element | Description |
|---|---|
| Name | Column name or alias |
| Type | Data type (if schema provided) |
| Origin | Direct, Derived, or Aggregated |
| Expression | Transformation applied (for derived columns) |
Column Origins
Section titled “Column Origins”- Direct - Column passes through unchanged
- Derived - Column computed from one or more sources
- Aggregated - Column involves aggregation (SUM, COUNT, etc.)
- Unknown - Cannot determine origin (missing schema)
Edge Types
Section titled “Edge Types”Edges (arrows) represent data flow:
| Edge Type | Description |
|---|---|
| Solid | Direct column mapping |
| Dashed | Indirect relationship (JOIN condition) |
| Thick | Multiple columns flow along this path |
| Colored | Grouped by source table |
Edge Confidence
Section titled “Edge Confidence”FlowScope assigns confidence levels to lineage:
- High - Explicit column reference
- Medium - Inferred from context
- Low - Best guess (e.g., SELECT *)
Navigation Controls
Section titled “Navigation Controls”Zoom and Pan
Section titled “Zoom and Pan”- Mouse wheel - Zoom in/out
- Click and drag - Pan the canvas
- Double-click - Zoom to fit
Control Panel
Section titled “Control Panel”| Control | Action |
|---|---|
| Fit | Zoom to show entire graph |
| Zoom In/Out | Adjust zoom level |
| Reset | Return to default view |
| Minimap | Toggle overview minimap |
Node Interaction
Section titled “Node Interaction”- Click node - Select and show details
- Double-click node - Focus on connected nodes
- Right-click node - Context menu with options
- Hover edge - Show lineage details
Focus Mode
Section titled “Focus Mode”Focus mode highlights lineage for a specific node:
- Select a node
- Click “Focus” or press
F - Only connected nodes and edges remain visible
- Press
Escapeor click “Clear” to exit
Focus Directions
Section titled “Focus Directions”- Upstream - Show where data comes from
- Downstream - Show where data flows to
- Both - Show full lineage chain
Search
Section titled “Search”Find nodes by name:
- Press
/or click the search icon - Type table or column name
- Matching nodes highlight
- Press
Enterto focus first match
Search supports:
- Partial matching
- Case-insensitive search
- Regular expressions (prefix with
/)
Filtering
Section titled “Filtering”Hide CTEs
Section titled “Hide CTEs”Toggle “Hide CTEs” to simplify the graph. CTE lineage is preserved through bypass edges connecting original sources to final outputs.
Filter by Table
Section titled “Filter by Table”Select tables to include or exclude from the view. Useful for focusing on specific data flows in large graphs.
Filter by Statement
Section titled “Filter by Statement”In multi-statement analysis, filter to show lineage for specific statements only.
Layout Algorithms
Section titled “Layout Algorithms”FlowScope offers multiple layout algorithms:
| Algorithm | Best For |
|---|---|
| Dagre | Hierarchical layouts (default) |
| Elk | Complex graphs with many crossings |
| Manual | User-positioned nodes |
Switch layouts in the settings panel. Manual positioning is preserved when switching back.
Exporting Visualizations
Section titled “Exporting Visualizations”Screenshot
Section titled “Screenshot”Export the current view as a PNG image:
- Adjust zoom and pan to frame your view
- Click “Export” → “Screenshot”
- Image downloads at current resolution
Mermaid Diagram
Section titled “Mermaid Diagram”Export as Mermaid diagram syntax for documentation:
graph LR orders --> monthly_sales monthly_sales --> output customers --> outputInteractive HTML
Section titled “Interactive HTML”Export a self-contained HTML file with full interactivity for sharing.