my project is local though , however i can see the dbt_project.yml file in my project folder directory
The key lines are:
Running command: ['/usr/bin/bash', '-c', 'dbt debug --profiles-dir /opt/airflow/dags/repo']
Then dbt reports:
Using profiles.yml file at /opt/airflow/dags/repo/profiles.yml
Using dbt_project.yml file at /tmp/airflowtmp.../dbt_project.yml
dbt project.yml file [ERROR not found]
What’s happening
--profiles-dir tells dbt where to find profiles.yml, but it does not tell dbt where the dbt project is.
For dbt_project.yml, dbt uses the current working directory unless you explicitly specify --project-dir.
Your Airflow task appears to be running with /tmp/... as its working directory, so dbt is looking there.
Try explicitly passing project-dir in your command
dbt_debug = BashOperator(
task_id="dbt_debug",
bash_command="dbt debug --profiles-dir /opt/airflow/dags/repo",
cwd="/opt/airflow/dags/repo",
)
