astronomer/agents/creating-openlineage-extractors
Claude Code and agent skill by astronomer/agents
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Create custom OpenLineage extractors for Airflow operators. Use when the user needs lineage from unsupported or third-party operators, wants column-level lineage, or needs complex extraction logic beyond what inlets/outlets provide.
Install
npx vskill@latest install astronomer/agents/creating-openlineage-extractorsSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Creating OpenLineage Extractors
This skill guides you through creating custom OpenLineage extractors to capture lineage from Airflow operators that don't have built-in support.
Reference: See the OpenLineage provider developer guide for the latest patterns and list of supported operators/hooks.
When to Use Each Approach
| Scenario | Approach | |
|---|---|---|
| Operator you own/maintain | OpenLineage Methods (recommended, simplest) | |
| Third-party operator you can't modify | Custom Extractor | |
| Need column-level lineage | OpenLineage Methods or Custom Extractor | |
| Complex extraction logic | OpenLineage Methods or Custom Extractor | |
| Simple table-level lineage | Inlets/Outlets (simplest, but lowest priority) |
Important: Always prefer OpenLineage methods over custom extractors when possible. Extractors are harder to write, easier to diverge from operator behavior after changes, and harder to debug.
On Astro
Astro includes built-in OpenLineage integration — no additional transport configuration is needed. Lineage events are automatically collected and displayed in the Astro UI's Lineage tab. Custom extractors deployed to an Astro project are automatically picked up, so you only need to register them in airflow.cfg or via environment variable and deploy.
Two Approaches
1. OpenLineage Methods (Recommended)
Use when you can add methods directly to your custom operator. This is the go-to solution for operators you own.
2. Custom Extractors
Use when you need lineage from third-party or provider operators that you cannot modify.
Approach 1: OpenLineage Methods (Recommended)
When you own the operator, add OpenLineage methods directly:
OpenLineage Methods Reference
| Method | When Called | Required | |
|---|---|---|---|
get_openlineage_facets_on_start() | Task enters RUNNING | No | |
get_openlineage_facets_on_complete(ti) | Task succeeds | No | |
get_openlineage_facets_on_failure(ti) | Task fails | No |
Implement only the methods you need. Unimplemented methods fall through to Hook-Level Lineage or inlets/outlets.
Approach 2: Custom Extractors
Use this approach only when you cannot modify the operator (e.g., third-party or provider operators).
Basic Structure
OperatorLineage Structure
Extraction Methods
| Method | When Called | Use For | |
|---|---|---|---|
_execute_extraction() | Before operator runs | Static/known lineage | |
extract_on_complete(task_instance) | After success | Runtime-determined lineage | |
extract_on_failure(task_instance) | After failure | Partial lineage on errors |
Registering Extractors
Option 1: Configuration file (`airflow.cfg`)
Option 2: Environment variable
Important: The path must be importable from the Airflow worker. Place extractors in your DAGs folder or installed package.
Common Patterns
SQL Operator Extractor
File Transfer Extractor
Dynamic Lineage from Execution
Common Pitfalls
1. Circular Imports
Problem: Importing Airflow modules at the top level causes circular imports.
2. Wrong Import Path
Problem: Extractor path doesn't match actual module location.
3. Not Handling None
Problem: Extraction fails when operator properties are None.
Testing Extractors
Unit Testing
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationPassed, 68 of 100Effective. 1 run. Evaluated 7 months ago.
Source
- SKILL.md in the repositoryCheckingskills/creating-openlineage-extractors/SKILL.md
Popularity
- Repository stars
- 290
- Repository forks
- 31
- 7-day trend score
- 28
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 20 Mar 2026, 7 months ago.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/astronomer/agents/creating-openlineage-extractors)