I’m trying the new astonomer-cosmos to orchestrate dbt with airflow. Anyone knows how to run only a specific model (i.e. dbt run --select my_model)? I managed only to run the entire project through the DbtTaskGroup:
with DAG(
dag_id="dbt_test",
start_date=datetime(2022, 11, 27),
doc_md=__doc__,
catchup=False,
default_args={"owner":"test"},
) as dag:
# run the entire project
dbt_run = DbtTaskGroup(
dbt_project_name="dbt_test",
conn_id="redshift",
dbt_args={
"schema": "test",
"dbt_executable_path": "/usr/local/airflow/dbt_venv/bin/dbt",
}
)