@@ -80,6 +80,37 @@ for table in source_tables:
8080 print (f " { table} " )
8181```
8282
83+ ** Output:**
84+ ```
85+ ColumnLineageGraph(
86+ query_units=[cte:monthly_sales, main]
87+ nodes=[
88+ monthly_sales.month (layer=cte, type=expression)
89+ monthly_sales.total_amount (layer=cte, type=aggregate)
90+ monthly_sales.user_id (layer=cte, type=direct_column)
91+ orders.amount (layer=input, type=base_column)
92+ orders.order_date (layer=input, type=base_column)
93+ orders.user_id (layer=input, type=base_column)
94+ output.month (layer=output, type=direct_column)
95+ output.name (layer=output, type=direct_column)
96+ output.total_amount (layer=output, type=direct_column)
97+ users.name (layer=input, type=base_column)
98+ ]
99+ edges=[
100+ monthly_sales.month -> output.month (direct_column)
101+ monthly_sales.total_amount -> output.total_amount (direct_column)
102+ orders.amount -> monthly_sales.total_amount (aggregate)
103+ orders.order_date -> monthly_sales.month (expression)
104+ orders.user_id -> monthly_sales.user_id (direct_column)
105+ users.name -> output.name (direct_column)
106+ ]
107+ )
108+ ------------------------------------------------------------
109+ 2 source tables:
110+ users
111+ orders
112+ ```
113+
83114### Multi-Query Pipeline Lineage
84115
85116``` python
@@ -135,6 +166,24 @@ for impact in impacts:
135166 print (f " { impact} " )
136167```
137168
169+ ** Output:**
170+ ```
171+ Pipeline with 3 queries
172+ ------------------------------------------------------------
173+ Execution order (5 tables):
174+ 1. source_events
175+ 2. users
176+ 3. raw_events
177+ 4. daily_active_users
178+ 5. user_summary
179+ ------------------------------------------------------------
180+ Backward lineage for user_summary.event_count (1 sources):
181+ ColumnNode('daily_active_users:raw_events.*')
182+ ------------------------------------------------------------
183+ Forward lineage for source_events.event_timestamp (1 impacts):
184+ ColumnNode('user_summary:user_summary.activity_date')
185+ ```
186+
138187### Metadata from SQL Comments
139188
140189``` python
@@ -176,6 +225,16 @@ for col in pipeline.columns.values():
176225 print (f " PII: { col.sql_metadata.pii} " )
177226```
178227
228+ ** Output:**
229+ ```
230+ Total columns: 6
231+ ------------------------------------------------------------
232+ PII columns (1):
233+ select:select.email
234+ Owner: data-team
235+ ------------------------------------------------------------
236+ ```
237+
179238### Metadata Management and Export
180239
181240``` python
@@ -229,6 +288,25 @@ GraphVizExporter.export_to_file(pipeline, "lineage.dot")
229288print (" ✓ Exported to lineage.json, columns.csv, lineage.dot" )
230289```
231290
291+ ** Output:**
292+ ```
293+ 📊 Propagating metadata for 8 columns...
294+ ✅ Done! Propagated metadata for 8 columns
295+ Found 3 PII columns:
296+ ColumnNode('raw.orders:raw.orders.user_email')
297+ Owner: data-team
298+ Tags: contact, sensitive
299+ ColumnNode('analytics.revenue:analytics.revenue.user_email')
300+ Owner: data-team
301+ Tags: contact, sensitive
302+ ColumnNode('analytics.revenue:raw.orders.user_email')
303+ Owner: data-team
304+ Tags: contact, sensitive
305+ ------------------------------------------------------------
306+ Exporting to multiple formats...
307+ ✓ Exported to lineage.json, columns.csv, lineage.dot
308+ ```
309+
232310### LLM-Powered Description Generation
233311
234312<!-- skip-test -->
@@ -255,7 +333,7 @@ pipeline = Pipeline(queries, dialect="bigquery")
255333
256334# Configure LLM (Ollama - free, local), or replace to any LangChain Chat models.
257335llm = ChatOllama(model = " qwen3-coder:30b" , temperature = 0.3 )
258- pipeline.column_graph. llm = llm
336+ pipeline.llm = llm
259337
260338# Generate descriptions for all columns
261339print (f " Generating descriptions for { len (pipeline.columns)} columns... " )
@@ -273,6 +351,31 @@ for col in columns_with_descriptions:
273351 print (f " { col.description} " )
274352```
275353
354+ ** Output:**
355+ ```
356+ Generating descriptions for 12 columns...
357+ 📊 Generating descriptions for 8 columns...
358+ ✅ Done! Generated 8 descriptions
359+ ------------------------------------------------------------
360+ Generated descriptions for 8 columns:
361+ raw.orders:raw.orders.order_id:
362+ Unique identifier for each customer order placed in the system per order record.
363+ raw.orders:raw.orders.user_email:
364+ User email addresses from the orders table, one per order record.
365+ raw.orders:raw.orders.amount:
366+ Order total amount in USD per customer.
367+ raw.orders:raw.orders.order_date:
368+ Order date when customers placed their purchases per day.
369+ analytics.revenue:analytics.revenue.user_email:
370+ User email addresses from order records, one per order entry.
371+ analytics.revenue:raw.orders.user_email:
372+ User email addresses from order records, one per order entry.
373+ analytics.revenue:analytics.revenue.total_revenue:
374+ Total revenue aggregated per customer from order amounts in USD.
375+ analytics.revenue:raw.orders.amount:
376+ Order total amount in USD per customer from raw orders table.
377+ ```
378+
276379## Architecture
277380
278381### Conceptual Structure
0 commit comments