xiaohongshu
xiaohongshu
Mapping the flow of data from source to destination for transparency, impact analysis, and troubleshooting.
Full skill instructions
Data Lineage is the process of tracking what happens to data as it flows through various stages—from its original source, through transformations (ETL), to its final destination (dashboards, ML models, or external APIs). Lineage provides the "genealogy" of a dataset.
Core Principle: "To trust the data, you must know where it came from and how it changed."
namespace + name) and keep it stable across environments.from __future__ import annotations
import json
from datetime import datetime, timezone
from uuid import uuid4
def build_openlineage_run_event(
*,
job_namespace: str,
job_name: str,
input_dataset: tuple[str, str],
output_dataset: tuple[str, str],
event_type: str = "COMPLETE",
) -> dict:
event_time = datetime.now(tz=timezone.utc).isoformat()
run_id = str(uuid4())
input_ns, input_name = input_dataset
output_ns, output_name = output_dataset
return {
"eventType": event_type,
"eventTime": event_time,
"run": {"runId": run_id},
"job": {"namespace": job_namespace, "name": job_name},
"inputs": [{"namespace": input_ns, "name": input_name}],
"outputs": [{"namespace": output_ns, "name": output_name}],
"producer": "https://openlineage.io/",
"schemaURL": "https://openlineage.io/spec/1-0-0/OpenLineage.json",
}
if __name__ == "__main__":
event = build_openlineage_run_event(
job_namespace="prod-etl",
job_name="clean_orders_job",
input_dataset=("db_raw", "raw_orders"),
output_dataset=("db_prod", "clean_orders"),
)
print(json.dumps(event, indent=2))
| Benefit | Use Case |
|---|---|
| Root Cause Analysis | A dashboard is wrong; which upstream table caused the error? |
| Impact Analysis | I want to delete a column; will it break any downstream reports? |
| Compliance | Where exactly does PII (SSN, Email) flow in our system? (GDPR/CCPA) |
| Data Discovery | How is the active_users metric actually calculated? |
raw_orders -> clean_orders -> orders_summary).first_name + last_name -> full_name).Reading SQL scripts to identify INSERT INTO... SELECT FROM patterns.
sqlglot or sqlfluff.OpenLineage is an open standard for lineage metadata collection. It uses "Jobs" and "Datasets" to represent relationships.
{
"eventTime": "2024-01-15T12:00:00Z",
"job": { "namespace": "prod-etl", "name": "clean_orders_job" },
"inputs": [ { "namespace": "db_raw", "name": "raw_orders" } ],
"outputs": [ { "namespace": "db_prod", "name": "clean_orders" } ]
}
dbt automatically generates a lineage graph (the "DAG") from your project dependencies.
# Generate and serve the lineage documentation
dbt docs generate
dbt docs serve
| Tool | Focus | Best For |
|---|---|---|
| OpenLineage | Standard | Orchestrators like Airflow, Spark, dbt. |
| Amundsen | Data Discovery | Built by Lyft; focusing on user-collaborative search. |
| DataHub | Metadata Platform | Built by LinkedIn; extensive lineage and ownership tracking. |
| Monte Carlo | Observability | Automatically infers lineage from query logs. |
| Marquez | Metadata Store | Reference implementation for OpenLineage. |
Imagine a "Monthly Revenue" dashboard shows $0.
gold_monthly_revenue table.gold_monthly_revenue is populated from silver_orders.silver_orders is 10GB but usually 50GB.silver_orders gets data from raw_stripe_api.Before running DROP COLUMN ccv in a production database:
transactions.ccv."fraud_detection_model.schema-management).Lineage is the primary tool for privacy compliance. You can "Tag" a source field as PII and the lineage tool will propagate that tag down the flow.
users.email (Tagged: PII)LOWER(email) (Propagated: PII)marketing_leads.contact (Auto-Propagated: PII)This allows security teams to identify which S3 buckets or BigQuery datasets require encryption at rest without manual audits.
43-data-reliability/data-contracts43-data-reliability/schema-management44-ai-governance/ai-compliancexiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience