cancel
Showing results for 
Search instead for 
Did you mean: 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results for 
Search instead for 
Did you mean: 

DBT RUN Command not working while invoked using subprocess.run

dk09
New Contributor

Hi,

I am using below code to run DBT Model from notebook.

dk09_0-1738320601721.png

I am using parameters to pass DBT run command(project directory, profile directory, schema name etc). The issue is, when I am running this code in my local workspace it is working fine but when I push this code to the workspace folder connected to git repository, the code does not works and throws exception "invalid path for profile" or "cannot find profile file".

When I try to read the profile.yml file in a dataframe from workspace folder connected to GIT, I am able to see the file contents. My question is why the DBT RUN command is not able to read the profile.yml file from the specified path.

Can anyone please suggest any workaround or solution to this.

1 REPLY 1

Alberto_Umana
Databricks Employee
Databricks Employee

Hi @dk09,

Can you share the path of: dbt_project_directory and also try inputting the folder path manually to debug it, does it still fail?

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group