clgraph

About

What is clgraph?

clgraph is a Python library that builds table-, CTE-, and column-level lineage from plain SQL — including {{templated}} names and dbt-style ref() projects. Everything you see in this Studio is the library's output, rendered.

That graph is the context layer — the same structure clgraph serves to a model through Python, the CLI, or its MCP server.

# pip install clgraph
from clgraph import Pipeline

pipeline = Pipeline(queries, dialect="bigquery")
pipeline.trace_column_backward("mart_customer_ltv", "lifetime_revenue")

Static analysis only

clgraph never connects to your database and never reads execution logs. It parses the SQL you give it and nothing else, which is why Studio can run entirely on SQL you paste into the browser.

Where to find it

The library lives on GitHub and ships on PyPI.