> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anomalyarmor.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Lineage Skill

> Explore data dependencies with /armor:lineage

<div aria-hidden="true" style={{position:"absolute",width:"1px",height:"1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap"}}>For LLM agents: documentation index at <a href="/llms.txt" tabIndex={-1}>/llms.txt</a>, full text at <a href="/llms-full.txt" tabIndex={-1}>/llms-full.txt</a>. Append .md to any page URL for plain markdown.</div>
The `/armor:lineage` skill helps you understand how data flows through your systems by showing upstream sources and downstream consumers.

## Usage

```
/armor:lineage
```

Or ask naturally:

* "What depends on this table?"
* "Where does this data come from?"
* "Show me the impact of changing the customers table"

## Concepts

### Upstream

Tables that feed data into the target table (data sources).

### Downstream

Tables that consume data from the target table (data consumers).

### Depth

How many levels of dependencies to traverse:

* **depth=1**: Direct dependencies only
* **depth=2**: Two levels
* **depth=3+**: Extended chain (max 5)

## Example Usage

### Find Downstream Consumers

```
You: What depends on the customers table?

Claude: Found 7 downstream tables that depend on customers:

Direct consumers (depth 1):
- gold.customer_metrics
- gold.order_summary
- reporting.customer_dashboard

Indirect consumers (depth 2):
- ml.churn_features
- ml.ltv_predictions
- analytics.weekly_cohorts
- external.bi_tool_view

Any changes to customers will affect these tables.
```

### Find Upstream Sources

```
You: Where does the orders_mart table get its data?

Claude: orders_mart has 4 upstream sources:

Direct sources:
- staging.orders_raw
- staging.customers
- staging.products

Root sources:
- raw.events

Data flow:
raw.events -> staging.orders_raw -> gold.orders_mart
```

### Impact Analysis

```
You: If I change the users table schema, what's affected?

Claude: Impact analysis for users:

Directly affected (12 tables):
- gold.user_metrics
- gold.user_activity
- reporting.user_dashboard
- ml.user_features
...

Indirectly affected (5 tables):
- analytics.monthly_actives
- reporting.exec_summary
...

Total: 17 tables may need updates.

Recommendation: Test changes in staging before production.
```

## Common Questions

### Where does lineage come from, query logs or dbt manifests?

AnomalyArmor parses query history from your warehouse to build table-level lineage automatically. If you use dbt, manifest-based lineage can be ingested on top for more complete column-level detail. See [lineage](/lineage/overview).

### How deep can I trace dependencies in one query?

Up to 5 levels. Ask for `depth=3` or "show me 5 levels deep" to extend traversal. Deeper queries take longer to return, so start with depth 2 unless you're doing full impact analysis.

## Related Skills

<CardGroup cols={2}>
  <Card title="Investigate" icon="magnifying-glass" href="/ai-agents/skills/investigate">
    Root cause analysis
  </Card>

  <Card title="Status" icon="heart-pulse" href="/ai-agents/skills/status">
    Health overview
  </Card>
</CardGroup>
