[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78290M86V7VT6CJJVEPJ0XS":3,"skill-same:01M78290M86V7VT6CJJVEPJ0XS":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M78290M86V7VT6CJJVEPJ0XS","annotating-task-lineage",null,"Annotate Airflow tasks with data lineage using inlets and outlets. Use when the user wants to add lineage metadata to tasks, specify input\u002Foutput datasets, or enable lineage tracking for operators without built-in OpenLineage extraction.","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fskills_sh\u002Fs\u002Fskills-sh_astronomer_agents_annotating-task-lineage\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: annotating-task-lineage\ndescription: Annotate Airflow tasks with data lineage using inlets and outlets. Use when the user wants to add lineage metadata to tasks, specify input\u002Foutput datasets, or enable lineage tracking for operators without built-in OpenLineage extraction.\n---\n\n# Annotating Task Lineage with Inlets & Outlets\n\nThis skill guides you through adding manual lineage annotations to Airflow tasks using `inlets` and `outlets`.\n\n> **Reference:** See the [OpenLineage provider developer guide](https:\u002F\u002Fairflow.apache.org\u002Fdocs\u002Fapache-airflow-providers-openlineage\u002Fstable\u002Fguides\u002Fdeveloper.html) for the latest supported operators and patterns.\n\n### On Astro\n\nLineage annotations defined with inlets and outlets are visualized in Astro's enhanced **Lineage tab**, which provides cross-DAG and cross-deployment lineage views. This means your annotations are immediately visible in the Astro UI, giving you a unified view of data flow across your entire Astro organization.\n\n## When to Use This Approach\n\n| Scenario | Use Inlets\u002FOutlets? |\n|----------|---------------------|\n| Operator has OpenLineage methods (`get_openlineage_facets_on_*`) | ❌ Modify the OL method directly |\n| Operator has no built-in OpenLineage extractor | ✅ Yes |\n| Simple table-level lineage is sufficient | ✅ Yes |\n| Quick lineage setup without custom code | ✅ Yes |\n| Need column-level lineage | ❌ Use OpenLineage methods or custom extractor |\n| Complex extraction logic needed | ❌ Use OpenLineage methods or custom extractor |\n\n> **Note:** Inlets\u002Foutlets are the lowest-priority fallback. If an OpenLineage extractor or method exists for the operator, it takes precedence. Use this approach for operators without extractors.\n\n---\n\n## Supported Types for Inlets\u002FOutlets\n\nYou can use **OpenLineage Dataset** objects or **Airflow Assets** for inlets and outlets:\n\n### OpenLineage Datasets (Recommended)\n\n```python\nfrom openlineage.client.event_v2 import Dataset\n\n# Database tables\nsource_table = Dataset(\n    namespace=\"postgres:\u002F\u002Fmydb:5432\",\n    name=\"public.orders\",\n)\ntarget_table = Dataset(\n    namespace=\"snowflake:\u002F\u002Faccount.snowflakecomputing.com\",\n    name=\"staging.orders_clean\",\n)\n\n# Files\ninput_file = Dataset(\n    namespace=\"s3:\u002F\u002Fmy-bucket\",\n    name=\"raw\u002Fevents\u002F2024-01-01.json\",\n)\n```\n\n### Airflow Assets (Airflow 3+)\n\n```python\nfrom airflow.sdk import Asset\n\n# Using Airflow's native Asset type\norders_asset = Asset(uri=\"s3:\u002F\u002Fmy-bucket\u002Fdata\u002Forders\")\n```\n\n### Airflow Datasets (Airflow 2.4+)\n\n```python\nfrom airflow.datasets import Dataset\n\n# Using Airflow's Dataset type (Airflow 2.4-2.x)\norders_dataset = Dataset(uri=\"s3:\u002F\u002Fmy-bucket\u002Fdata\u002Forders\")\n```\n\n---\n\n## Basic Usage\n\n### Setting Inlets and Outlets on Operators\n\n```python\nfrom airflow import DAG\nfrom airflow.operators.bash import BashOperator\nfrom openlineage.client.event_v2 import Dataset\nimport pendulum\n\n# Define your lineage datasets\nsource_table = Dataset(\n    namespace=\"snowflake:\u002F\u002Faccount.snowflakecomputing.com\",\n    name=\"raw.orders\",\n)\ntarget_table = Dataset(\n    namespace=\"snowflake:\u002F\u002Faccount.snowflakecomputing.com\",\n    name=\"staging.orders_clean\",\n)\noutput_file = Dataset(\n    namespace=\"s3:\u002F\u002Fmy-bucket\",\n    name=\"exports\u002Forders.parquet\",\n)\n\nwith DAG(\n    dag_id=\"etl_with_lineage\",\n    start_date=pendulum.datetime(2024, 1, 1, tz=\"UTC\"),\n    schedule=\"@daily\",\n) as dag:\n\n    transform = BashOperator(\n        task_id=\"transform_orders\",\n        bash_command=\"echo 'transforming...'\",\n        inlets=[source_table],           # What this task reads\n        outlets=[target_table],          # What this task writes\n    )\n\n    export = BashOperator(\n        task_id=\"export_to_s3\",\n        bash_command=\"echo 'exporting...'\",\n        inlets=[target_table],           # Reads from previous output\n        outlets=[output_file],           # Writes to S3\n    )\n\n    transform >> export\n```\n\n### Multiple Inputs and Outputs\n\nTasks often read from multiple sources and write to multiple destinations:\n\n```python\nfrom openlineage.client.event_v2 import Dataset\n\n# Multiple source tables\ncustomers = Dataset(namespace=\"postgres:\u002F\u002Fcrm:5432\", name=\"public.customers\")\norders = Dataset(namespace=\"postgres:\u002F\u002Fsales:5432\", name=\"public.orders\")\nproducts = Dataset(namespace=\"postgres:\u002F\u002Finventory:5432\", name=\"public.products\")\n\n# Multiple output tables\ndaily_summary = Dataset(namespace=\"snowflake:\u002F\u002Faccount\", name=\"analytics.daily_summary\")\ncustomer_metrics = Dataset(namespace=\"snowflake:\u002F\u002Faccount\", name=\"analytics.customer_metrics\")\n\naggregate_task = PythonOperator(\n    task_id=\"build_daily_aggregates\",\n    python_callable=build_aggregates,\n    inlets=[customers, orders, products],      # All inputs\n    outlets=[daily_summary, customer_metrics], # All outputs\n)\n```\n\n---\n\n## Setting Lineage in Custom Operators\n\nWhen building custom operators, you have two options:\n\n### Option 1: Implement OpenLineage Methods (Recommended)\n\nThis is the preferred approach as it gives you full control over lineage extraction:\n\n```python\nfrom airflow.models import BaseOperator\n\n\nclass MyCustomOperator(BaseOperator):\n    def __init__(self, source_table: str, target_table: str, **kwargs):\n        super().__init__(**kwargs)\n        self.source_table = source_table\n        self.target_table = target_table\n\n    def execute(self, context):\n        # ... perform the actual work ...\n        self.log.info(f\"Processing {self.source_table} -> {self.target_table}\")\n\n    def get_openlineage_facets_on_complete(self, task_instance):\n        \"\"\"Return lineage after successful execution.\"\"\"\n        from openlineage.client.event_v2 import Dataset\n        from airflow.providers.openlineage.extractors import OperatorLineage\n\n        return OperatorLineage(\n            inputs=[Dataset(namespace=\"warehouse:\u002F\u002Fdb\", name=self.source_table)],\n            outputs=[Dataset(namespace=\"warehouse:\u002F\u002Fdb\", name=self.target_table)],\n        )\n```\n\n### Option 2: Set Inlets\u002FOutlets Dynamically\n\nFor simpler cases, set lineage within the `execute` method (non-deferrable operators only):\n\n```python\nfrom airflow.models import BaseOperator\nfrom openlineage.client.event_v2 import Dataset\n\n\nclass MyCustomOperator(BaseOperator):\n    def __init__(self, source_table: str, target_table: str, **kwargs):\n        super().__init__(**kwargs)\n        self.source_table = source_table\n        self.target_table = target_table\n\n    def execute(self, context):\n        # Set lineage dynamically based on operator parameters\n        self.inlets = [\n            Dataset(namespace=\"warehouse:\u002F\u002Fdb\", name=self.source_table)\n        ]\n        self.outlets = [\n            Dataset(namespace=\"warehouse:\u002F\u002Fdb\", name=self.target_table)\n        ]\n\n        # ... perform the actual work ...\n        self.log.info(f\"Processing {self.source_table} -> {self.target_table}\")\n```\n\n---\n\n## Dataset Naming Helpers\n\nUse the [OpenLineage dataset naming helpers](https:\u002F\u002Fopenlineage.io\u002Fdocs\u002Fclient\u002Fpython\u002Fbest-practices#dataset-naming-helpers) to ensure consistent naming across platforms:\n\n```python\nfrom openlineage.client.event_v2 import Dataset\n\n# Snowflake\nfrom openlineage.client.naming.snowflake import SnowflakeDatasetNaming\n\nnaming = SnowflakeDatasetNaming(\n    account_identifier=\"myorg-myaccount\",\n    database=\"mydb\",\n    schema=\"myschema\",\n    table=\"mytable\",\n)\ndataset = Dataset(namespace=naming.get_namespace(), name=naming.get_name())\n# -> namespace: \"snowflake:\u002F\u002Fmyorg-myaccount\", name: \"mydb.myschema.mytable\"\n\n# BigQuery\nfrom openlineage.client.naming.bigquery import BigQueryDatasetNaming\n\nnaming = BigQueryDatasetNaming(\n    project=\"my-project\",\n    dataset=\"my_dataset\",\n    table=\"my_table\",\n)\ndataset = Dataset(namespace=naming.get_namespace(), name=naming.get_name())\n# -> namespace: \"bigquery\", name: \"my-project.my_dataset.my_table\"\n\n# S3\nfrom openlineage.client.naming.s3 import S3DatasetNaming\n\nnaming = S3DatasetNaming(bucket=\"my-bucket\", key=\"path\u002Fto\u002Ffile.parquet\")\ndataset = Dataset(namespace=naming.get_namespace(), name=naming.get_name())\n# -> namespace: \"s3:\u002F\u002Fmy-bucket\", name: \"path\u002Fto\u002Ffile.parquet\"\n\n# PostgreSQL\nfrom openlineage.client.naming.postgres import PostgresDatasetNaming\n\nnaming = PostgresDatasetNaming(\n    host=\"localhost\",\n    port=5432,\n    database=\"mydb\",\n    schema=\"public\",\n    table=\"users\",\n)\ndataset = Dataset(namespace=naming.get_namespace(), name=naming.get_name())\n# -> namespace: \"postgres:\u002F\u002Flocalhost:5432\", name: \"mydb.public.users\"\n```\n\n> **Note:** Always use the naming helpers instead of constructing namespaces manually. If a helper is missing for your platform, check the [OpenLineage repo](https:\u002F\u002Fgithub.com\u002FOpenLineage\u002FOpenLineage) or request it.\n\n---\n\n## Precedence Rules\n\nOpenLineage uses this precedence for lineage extraction:\n\n1. **Custom Extractors** (highest) - User-registered extractors\n2. **OpenLineage Methods** - `get_openlineage_facets_on_*` in operator\n3. **Hook-Level Lineage** - Lineage collected from hooks via `HookLineageCollector`\n4. **Inlets\u002FOutlets** (lowest) - Falls back to these if nothing else extracts lineage\n\n> **Note:** If an extractor or method exists but returns no datasets, OpenLineage will check hook-level lineage, then fall back to inlets\u002Foutlets.\n\n---\n\n## Best Practices\n\n### Use the Naming Helpers\n\nAlways use OpenLineage naming helpers for consistent dataset creation:\n\n```python\nfrom openlineage.client.event_v2 import Dataset\nfrom openlineage.client.naming.snowflake import SnowflakeDatasetNaming\n\n\ndef snowflake_dataset(schema: str, table: str) -> Dataset:\n    \"\"\"Create a Snowflake Dataset using the naming helper.\"\"\"\n    naming = SnowflakeDatasetNaming(\n        account_identifier=\"mycompany\",\n        database=\"analytics\",\n        schema=schema,\n        table=table,\n    )\n    return Dataset(namespace=naming.get_namespace(), name=naming.get_name())\n\n\n# Usage\nsource = snowflake_dataset(\"raw\", \"orders\")\ntarget = snowflake_dataset(\"staging\", \"orders_clean\")\n```\n\n### Document Your Lineage\n\nAdd comments explaining the data flow:\n\n```python\ntransform = SqlOperator(\n    task_id=\"transform_orders\",\n    sql=\"...\",\n    # Lineage: Reads raw orders, joins with customers, writes to staging\n    inlets=[\n        snowflake_dataset(\"raw\", \"orders\"),\n        snowflake_dataset(\"raw\", \"customers\"),\n    ],\n    outlets=[\n        snowflake_dataset(\"staging\", \"order_details\"),\n    ],\n)\n```\n\n### Keep Lineage Accurate\n\n- Update inlets\u002Foutlets when SQL queries change\n- Include all tables referenced in JOINs as inlets\n- Include all tables written to (including temp tables if relevant)\n- **Outlet-only and inlet-only annotations are valid.** One-sided annotations are encouraged for lineage visibility even without a corresponding inlet or outlet in another DAG.\n\n---\n\n## Limitations\n\n| Limitation | Workaround |\n|------------|------------|\n| Table-level only (no column lineage) | Use OpenLineage methods or custom extractor |\n| Overridden by extractors\u002Fmethods | Only use for operators without extractors |\n| Static at DAG parse time | Set dynamically in `execute()` or use OL methods |\n| Deferrable operators lose dynamic lineage | Use OL methods instead; attributes set in `execute()` are lost when deferring |\n\n---\n\n## Related Skills\n\n- **creating-openlineage-extractors**: For column-level lineage or complex extraction\n- **tracing-upstream-lineage**: Investigate where data comes from\n- **tracing-downstream-lineage**: Investigate what depends on data\n","# Annotating Task Lineage with Inlets & Outlets\n\nThis skill guides you through adding manual lineage annotations to Airflow tasks using `inlets` and `outlets`.\n\n> **Reference:** See the [OpenLineage provider developer guide](https:\u002F\u002Fairflow.apache.org\u002Fdocs\u002Fapache-airflow-providers-openlineage\u002Fstable\u002Fguides\u002Fdeveloper.html) for the latest supported operators and patterns.\n\n### On Astro\n\nLineage annotations defined with inlets and outlets are visualized in Astro's enhanced **Lineage tab**, which provides cross-DAG and cross-deployment lineage views. This means your annotations are immediately visible in the Astro UI, giving you a unified view of data flow across your entire Astro organization.\n\n## When to Use This Approach\n\n| Scenario | Use Inlets\u002FOutlets? |\n|----------|---------------------|\n| Operator has OpenLineage methods (`get_openlineage_facets_on_*`) | ❌ Modify the OL method directly |\n| Operator has no built-in OpenLineage extractor | ✅ Yes |\n| Simple table-level lineage is sufficient | ✅ Yes |\n| Quick lineage setup without custom code | ✅ Yes |\n| Need column-level lineage | ❌ Use OpenLineage methods or custom extractor |\n| Complex extraction logic needed | ❌ Use OpenLineage methods or custom extractor |\n\n> **Note:** Inlets\u002Foutlets are the lowest-priority fallback. If an OpenLineage extractor or method exists for the operator, it takes precedence. Use this approach for operators without extractors.\n\n---\n\n## Supported Types for Inlets\u002FOutlets\n\nYou can use **OpenLineage Dataset** objects or **Airflow Assets** for inlets and outlets:\n\n### OpenLineage Datasets (Recommended)\n\n```python\nfrom openlineage.client.event_v2 import Dataset\n\n# Database tables\nsource_table = Dataset(\n    namespace=\"postgres:\u002F\u002Fmydb:5432\",\n    name=\"public.orders\",\n)\ntarget_table = Dataset(\n    namespace=\"snowflake:\u002F\u002Faccount.snowflakecomputing.com\",\n    name=\"staging.orders_clean\",\n)\n\n# Files\ninput_file = Dataset(\n    namespace=\"s3:\u002F\u002Fmy-bucket\",\n    name=\"raw\u002Fevents\u002F2024-01-01.json\",\n)\n```\n\n### Airflow Assets (Airflow 3+)\n\n```python\nfrom airflow.sdk import Asset\n\n# Using Airflow's native Asset type\norders_asset = Asset(uri=\"s3:\u002F\u002Fmy-bucket\u002Fdata\u002Forders\")\n```\n\n### Airflow Datasets (Airflow 2.4+)\n\n```python\nfrom airflow.datasets import Dataset\n\n# Using Airflow's Dataset type (Airflow 2.4-2.x)\norders_dataset = Dataset(uri=\"s3:\u002F\u002Fmy-bucket\u002Fdata\u002Forders\")\n```\n\n---\n\n## Basic Usage\n\n### Setting Inlets and Outlets on Operators\n\n```python\nfrom airflow import DAG\nfrom airflow.operators.bash import BashOperator\nfrom openlineage.client.event_v2 import Dataset\nimport pendulum\n\n# Define your lineage datasets\nsource_table = Dataset(\n    namespace=\"snowflake:\u002F\u002Faccount.snowflakecomputing.com\",\n    name=\"raw.orders\",\n)\ntarget_table = Dataset(\n    namespace=\"snowflake:\u002F\u002Faccount.snowflakecomputing.com\",\n    name=\"staging.orders_clean\",\n)\noutput_file = Dataset(\n    namespace=\"s3:\u002F\u002Fmy-bucket\",\n    name=\"exports\u002Forders.parquet\",\n)\n\nwith DAG(\n    dag_id=\"etl_with_lineage\",\n    start_date=pendulum.datetime(2024, 1, 1, tz=\"UTC\"),\n    schedule=\"@daily\",\n) as dag:\n\n    transform = BashOperator(\n        task_id=\"transform_orders\",\n        bash_command=\"echo 'transforming...'\",\n        inlets=[source_table],           # What this task reads\n        outlets=[target_table],          # What this task writes\n    )\n\n    export = BashOperator(\n        task_id=\"export_to_s3\",\n        bash_command=\"echo 'exporting...'\",\n        inlets=[target_table],           # Reads from previous output\n        outlets=[output_file],           # Writes to S3\n    )\n\n    transform >> export\n```\n\n### Multiple Inputs and Outputs\n\nTasks often read from multiple sources and write to multiple destinations:\n\n```python\nfrom openlineage.client.event_v2 import Dataset\n\n# Multiple source tables\ncustomers = Dataset(namespace=\"postgres:\u002F\u002Fcrm:5432\", name=\"public.customers\")\norders = Dataset(namespace=\"postgres:\u002F\u002Fsales:5432\", name=\"public.orders\")\nproducts = Dataset(namespace=\"postgres:\u002F\u002Finventory:5432\", name=\"public.products\")\n\n# Multiple output tables\ndaily_summary = Dataset(namespace=\"snowflake:\u002F\u002Faccount\", name=\"analytics.daily_summary\")\ncustomer_metrics = Dataset(namespace=\"snowflake:\u002F\u002Faccount\", name=\"analytics.customer_metrics\")\n\naggregate_task = PythonOperator(\n    task_id=\"build_daily_aggregates\",\n    python_callable=build_aggregates,\n    inlets=[customers, orders, products],      # All inputs\n    outlets=[daily_summary, customer_metrics], # All outputs\n)\n```\n\n---\n\n## Setting Lineage in Custom Operators\n\nWhen building custom operators, you have two options:\n\n### Option 1: Implement OpenLineage Methods (Recommended)\n\nThis is the preferred approach as it gives you full control over lineage extraction:\n\n```python\nfrom airflow.models import BaseOperator\n\n\nclass MyCustomOperator(BaseOperator):\n    def __init__(self, source_table: str, target_table: str, **kwargs):\n        super().__init__(**kwargs)\n        self.source_table = source_table\n        self.target_table = target_table\n\n    def execute(self, context):\n        # ... perform the actual work ...\n        self.log.info(f\"Processing {self.source_table} -> {self.target_table}\")\n\n    def get_openlineage_facets_on_complete(self, task_instance):\n        \"\"\"Return lineage after successful execution.\"\"\"\n        from openlineage.client.event_v2 import Dataset\n        from airflow.providers.openlineage.extractors import OperatorLineage\n\n        return OperatorLineage(\n            inputs=[Dataset(namespace=\"warehouse:\u002F\u002Fdb\", name=self.source_table)],\n            outputs=[Dataset(namespace=\"warehouse:\u002F\u002Fdb\", name=self.target_table)],\n        )\n```\n\n### Option 2: Set Inlets\u002FOutlets Dynamically\n\nFor simpler cases, set lineage within the `execute` method (non-deferrable operators only):\n\n```python\nfrom airflow.models import BaseOperator\nfrom openlineage.client.event_v2 import Dataset\n\n\nclass MyCustomOperator(BaseOperator):\n    def __init__(self, source_table: str, target_table: str, **kwargs):\n        super().__init__(**kwargs)\n        self.source_table = source_table\n        self.target_table = target_table\n\n    def execute(self, context):\n        # Set lineage dynamically based on operator parameters\n        self.inlets = [\n            Dataset(namespace=\"warehouse:\u002F\u002Fdb\", name=self.source_table)\n        ]\n        self.outlets = [\n            Dataset(namespace=\"warehouse:\u002F\u002Fdb\", name=self.target_table)\n        ]\n\n        # ... perform the actual work ...\n        self.log.info(f\"Processing {self.source_table} -> {self.target_table}\")\n```\n\n---\n\n## Dataset Naming Helpers\n\nUse the [OpenLineage dataset naming helpers](https:\u002F\u002Fopenlineage.io\u002Fdocs\u002Fclient\u002Fpython\u002Fbest-practices#dataset-naming-helpers) to ensure consistent naming across platforms:\n\n```python\nfrom openlineage.client.event_v2 import Dataset\n\n# Snowflake\nfrom openlineage.client.naming.snowflake import SnowflakeDatasetNaming\n\nnaming = SnowflakeDatasetNaming(\n    account_identifier=\"myorg-myaccount\",\n    database=\"mydb\",\n    schema=\"myschema\",\n    table=\"mytable\",\n)\ndataset = Dataset(namespace=naming.get_namespace(), name=naming.get_name())\n# -> namespace: \"snowflake:\u002F\u002Fmyorg-myaccount\", name: \"mydb.myschema.mytable\"\n\n# BigQuery\nfrom openlineage.client.naming.bigquery import BigQueryDatasetNaming\n\nnaming = BigQueryDatasetNaming(\n    project=\"my-project\",\n    dataset=\"my_dataset\",\n    table=\"my_table\",\n)\ndataset = Dataset(namespace=naming.get_namespace(), name=naming.get_name())\n# -> namespace: \"bigquery\", name: \"my-project.my_dataset.my_table\"\n\n# S3\nfrom openlineage.client.naming.s3 import S3DatasetNaming\n\nnaming = S3DatasetNaming(bucket=\"my-bucket\", key=\"path\u002Fto\u002Ffile.parquet\")\ndataset = Dataset(namespace=naming.get_namespace(), name=naming.get_name())\n# -> namespace: \"s3:\u002F\u002Fmy-bucket\", name: \"path\u002Fto\u002Ffile.parquet\"\n\n# PostgreSQL\nfrom openlineage.client.naming.postgres import PostgresDatasetNaming\n\nnaming = PostgresDatasetNaming(\n    host=\"localhost\",\n    port=5432,\n    database=\"mydb\",\n    schema=\"public\",\n    table=\"users\",\n)\ndataset = Dataset(namespace=naming.get_namespace(), name=naming.get_name())\n# -> namespace: \"postgres:\u002F\u002Flocalhost:5432\", name: \"mydb.public.users\"\n```\n\n> **Note:** Always use the naming helpers instead of constructing namespaces manually. If a helper is missing for your platform, check the [OpenLineage repo](https:\u002F\u002Fgithub.com\u002FOpenLineage\u002FOpenLineage) or request it.\n\n---\n\n## Precedence Rules\n\nOpenLineage uses this precedence for lineage extraction:\n\n1. **Custom Extractors** (highest) - User-registered extractors\n2. **OpenLineage Methods** - `get_openlineage_facets_on_*` in operator\n3. **Hook-Level Lineage** - Lineage collected from hooks via `HookLineageCollector`\n4. **Inlets\u002FOutlets** (lowest) - Falls back to these if nothing else extracts lineage\n\n> **Note:** If an extractor or method exists but returns no datasets, OpenLineage will check hook-level lineage, then fall back to inlets\u002Foutlets.\n\n---\n\n## Best Practices\n\n### Use the Naming Helpers\n\nAlways use OpenLineage naming helpers for consistent dataset creation:\n\n```python\nfrom openlineage.client.event_v2 import Dataset\nfrom openlineage.client.naming.snowflake import SnowflakeDatasetNaming\n\n\ndef snowflake_dataset(schema: str, table: str) -> Dataset:\n    \"\"\"Create a Snowflake Dataset using the naming helper.\"\"\"\n    naming = SnowflakeDatasetNaming(\n        account_identifier=\"mycompany\",\n        database=\"analytics\",\n        schema=schema,\n        table=table,\n    )\n    return Dataset(namespace=naming.get_namespace(), name=naming.get_name())\n\n\n# Usage\nsource = snowflake_dataset(\"raw\", \"orders\")\ntarget = snowflake_dataset(\"staging\", \"orders_clean\")\n```\n\n### Document Your Lineage\n\nAdd comments explaining the data flow:\n\n```python\ntransform = SqlOperator(\n    task_id=\"transform_orders\",\n    sql=\"...\",\n    # Lineage: Reads raw orders, joins with customers, writes to staging\n    inlets=[\n        snowflake_dataset(\"raw\", \"orders\"),\n        snowflake_dataset(\"raw\", \"customers\"),\n    ],\n    outlets=[\n        snowflake_dataset(\"staging\", \"order_details\"),\n    ],\n)\n```\n\n### Keep Lineage Accurate\n\n- Update inlets\u002Foutlets when SQL queries change\n- Include all tables referenced in JOINs as inlets\n- Include all tables written to (including temp tables if relevant)\n- **Outlet-only and inlet-only annotations are valid.** One-sided annotations are encouraged for lineage visibility even without a corresponding inlet or outlet in another DAG.\n\n---\n\n## Limitations\n\n| Limitation | Workaround |\n|------------|------------|\n| Table-level only (no column lineage) | Use OpenLineage methods or custom extractor |\n| Overridden by extractors\u002Fmethods | Only use for operators without extractors |\n| Static at DAG parse time | Set dynamically in `execute()` or use OL methods |\n| Deferrable operators lose dynamic lineage | Use OL methods instead; attributes set in `execute()` are lost when deferring |\n\n---\n\n## Related Skills\n\n- **creating-openlineage-extractors**: For column-level lineage or complex extraction\n- **tracing-upstream-lineage**: Investigate where data comes from\n- **tracing-downstream-lineage**: Investigate what depends on data\n",{"name":5,"description":7},"master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fskills_sh\u002Fs\u002Fskills-sh_astronomer_agents_annotating-task-lineage",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill annotating-task-lineage",{"tool":39,"command":40},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill annotating-task-lineage",{"tool":42,"command":43},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill annotating-task-lineage","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fskills_sh\u002Fs\u002Fskills-sh_astronomer_agents_annotating-task-lineage\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]