cosmos-dbt column level metadata #1427
Labels
area:lineage
Related to open lineage or DBT dataset lineage
dbt:docs
Primarily related to dbt docs command or functionality
profile:snowflake
Related to Snowflake ProfileConfig
Hi Team
I am using cosmos dbt for my client in a project.
The dag looks like this
`import os
from datetime import datetime
from cosmos import DbtDag, ProjectConfig, ProfileConfig, ExecutionConfig
from cosmos.profiles import SnowflakeUserPasswordProfileMapping
profile_config = ProfileConfig(
profile_name="default",
target_name="dev",
profile_mapping=SnowflakeUserPasswordProfileMapping(
conn_id="snowflake_conn",
profile_args={"database": "dbt_db", "schema": "dbt_schema"},
)
)
dbt_snowflake_dag = DbtDag(
project_config=ProjectConfig(f"{os.environ['AIRFLOW_HOME']}/dags/dbt/dbt_pipeline",),
operator_args={"install_deps": True},
profile_config=profile_config,
execution_config=ExecutionConfig(dbt_executable_path=f"{os.environ['AIRFLOW_HOME']}/dbt_venv/bin/dbt",),
schedule_interval="@daily",
start_date=datetime(2023, 9, 10),
catchup=False,
dag_id="dbt_dag",
)
`
I have set open lineage using apache-airflow-providers-openlineage
I am sending lineage events to local marquez api and the lineage looks like
You will notice that schema (cloumns are not shown in the lineage graph)
But the issue is that i need column informations as well as shown below .Every dataset needs to have column schema information
What changes should i make in the DbtDag so that it can pass columns/schema informations to airflow and subsequently to the marquez
.
I am aware that column mapping is developed in dbt when we generate docs using dbt-ol docs generate
Additional table and column level metadata will be available if catalog.json, a result of running dbt docs generate, will be found in the target directory.How can i incorporate in cosmos to get this metadata?
The text was updated successfully, but these errors were encountered: