Lineage
Run lineage
codeweb lineage <TARGET> computes how data reaches — and leaves — a table or column:
Options:
--direction accepts upstream, downstream, or both (default).
Output formats
--format dot and --format mermaid export the entity subgraph. The default --format tree supports four renderings via --view:
| View | Rendering |
|---|---|
tree (default) | Indented lineage tree |
entity | Entities only, no processes |
relation | Explicit source──process──▶target lines |
grouped | Branches grouped by connecting process |
Tune flow detection
With --flow-only, codeweb hides sources that only reference a table without moving data. The thresholds live in codeweb.toml:
The [lineage] section exposes flow thresholds (flow_min_overlap, flow_min_ratio defaults apply unless overridden).
Column-level analysis
Lineage answers “where does this column come from”. For the inverse question — “which filters, joins, and mappings does a procedure apply to its tables” — use the column analysis commands codeweb columns and codeweb predicates. The HTTP equivalent is GET /api/v1/lineage; the MCP equivalent is codeweb_lineage.