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: 

Can job 'run_as' be assigned to users/principals who actually run it?

Long_Tran
New Contributor

Can job 'run_as' be assigned to users/principals who actually run it? instead of always a fixed creator/user/pricipal?

When a job is run, I would like to see in the job setting "run_as" the name of the actual user/principal who runs it.

Currently, "run_as" is set to a fixed user/principal. If someone else runs this job (either manually or using APIs), "run_as" is still showed as the fixed user/principal, and not the actual user/principal who runs it.

Am I missing something or this feature is actually not available?

2 REPLIES 2

Wojciech_BUK
Valued Contributor III

This is not avaliable in Workflow/Jobs.
Job should newer be run as person who is executing the job, especialy in Production.
The reason is that the output might be not the same, base on person who is running the job (e.g. diffrent Row Level Access). 
If you must use Workflows, you could give people "Manage" permission over job and let them change run as every time (but that is ugly solution).

What you are looking for is something diffrent:

- give person ability to run notebook / package using all-purpose cluster

- if you want to do it via job and job cluster - let people use  JOB API "/api/2.1/jobs/run-now" 
https://docs.databricks.com/api/azure/workspace/jobs/runnow

701153
New Contributor II

Yeah, the functionality is odd. You can't change the Run As user to anyone but yourself. 

But you can run it using the Run As setting previously used. This sort of makes sense if the workflow is created to be run as a service principal with specific permissions, if everyone was going to run it as that user. But it doesn't make sense that you can run it as the previous person if that person had changed the Run As to themselves.

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