cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Running dbt macro inside Databricks notebook as a part of Workflow

JakubII
New Contributor

So.. I have Databricks and I'm using dbt-databricks adapter to run dbt. Everything works fine but for some reasons I need to run some stuff inside of notebook. That still worked fine for some time but after upgrading to dbt-databricks 1.5.5 something broke and I can't figure it what exactly. It works when downgrading but I would like to work with newest versions.

Workload always fails when I'm calling out dbf macro (run-operation ..). Weird think is that notebook independently works fine even with macro but inside of workflow it fails and always same error and nothing else:

" OSError: [Errno 22] Invalid argument: 'dbt_packages'

Command exited with return code 2 Execution of shell command failed "

I tried skipping macro and then it works fine but I need to run these macros. Tried to run just one basic macro and it still failed so I'm sure it's the execution of macro that is causing workflow to fail.

I'm expecting this to be some problem with how workflow Is execution notebooks but couldn't find anything that would help solve my issue.

0 REPLIES 0

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