cancel
Showing results for 
Search instead for 
Did you mean: 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with changing RunAs owner

ckunal_eng
New Contributor

Dear Contributors,

I have a scenario where I am required to trigger a couple of jobs (lets say 4) based on the success of a master job. The master job has a Service Principal attached to it, which is the owner. It is going to produce a list of items which would be the input for these 4 dependent jobs. However, the requirement is that the cascaded jobs should run with a different SP for each of them. This can be configured by having a dictionary with the items from the list as keys and values as the SP names. The intention is to trigger each dependent job but with the RunAs owner different for each as the SP from the master job will not have access to make changes that the individual jobs require.

Any pointers or solutions would be highly appreciated.

1 REPLY 1

Raman_Unifeye
Contributor III

@ckunal_eng - 

One single Databricks Job run cannot dynamically change its "Run As" identity during execution. Rather you will need a pattern that separates the triggering identity from the executing identity.

I would pre-configure 4 dependent jobs with their respective Service Principals (SPs) and using the Master Job as a Trigger/dispatcher.

Master job's SP to have CAN_MANAGE_RUN permission on the above 4 jobs. This job could run a Python notebook that iterates through your dictionary and triggers the relevant Job via the Databricks Jobs API.

 


RG #Driving Business Outcomes with Data Intelligence

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now