dag
Display the dependency graph (DAG) of all models.
Models are grouped by execution level, showing which models can run in parallel and their dependency relationships.
Output adapts to environment:
- Terminal: Styled output with colors
- Piped/Scripted: Markdown format (agent-friendly)
Usage
bash
leapsql dagGlobal Options
| Option | Short | Default | Description |
|---|---|---|---|
--config | config file (default: ./leapsql.yaml) | ||
--database | Path to DuckDB database (empty for in-memory) | ||
--env | Environment name | ||
--macros-dir | Path to macros directory | ||
--models-dir | Path to models directory | ||
--output | -o | Output format (auto|text|markdown|json) | |
--project-dir | -C | Project root directory (auto-detected from models-dir or config file location) | |
--seeds-dir | Path to seeds directory | ||
--state | Path to state database | ||
--target | -t | Target environment to use (e.g., dev, staging, prod) | |
--verbose | -v | false | Verbose output |
Examples
bash
# Show the DAG
leapsql dag
# Show DAG with verbose model info
leapsql dag -v
# Output as JSON
leapsql dag --output json
# Output as Markdown
leapsql dag --output markdown