โ02-12-2024 12:06 PM - edited โ02-12-2024 12:07 PM
Hi team,
Greetings.
Do you know if there is a way to update the creator of a databricks_job using the API? the Documentation does not show "the creator" property and when I tried setting the creator, this property is not updated in the workspace UI.
The reason behind this is for having the same feature with a cluster creator when we can update the owner, but with databricks_job don't.
Note:
I am not referring about the "owner" in the job permissions. I am referring to the "creator" of the job
Thanks
โ02-12-2024 09:25 PM
Hi @danmlopsmaz , Thanks for bringing up your concerns, always happy to help ๐
I understand the customer wanted to change the creator of the job but at this moment we could change the owner but not the creator. But you should be able to clone an existing job, this will ensure all the configs are replicated and the creator name would be updated.
Kindly refer to this document to copy the job: https://docs.databricks.com/en/archive/dev-tools/cli/jobs-cli.html#create-a-job:~:text=To%20copy%20a....
Please let me know if this helps and leave a like if this helps, followups are appreciated.
Kudos
Ayushi
โ02-12-2024 02:54 PM - edited โ02-12-2024 02:56 PM
Hey @danmlopsmaz
Thanks for bringing your concern to the community,
Unfortunately, looks like updating the "creator" of a Databricks job through the API is not possible at this time. The Databricks Jobs API and documentation do not currently expose any such functionality as you might have already checked. Additionally, attempting to set the "creator" field while updating the job will not change the displayed creator in the workspace UI.
While the lack of this feature might seem like a limitation compared to updating cluster ownership, according to me there could be important reasons behind this choice:
As I donโt have specific details about your use case but here are a few alternative approaches which I can think of:
1. Leverage Permissions and Owners:
2. Store the creator information (username,timestamp, etc.) alongside the job metadata in a separate system like a database or data lake. Using this you can manage your user who created the job.
3. Consider using Databricks Workflows, which offer shared ownership and collaborative development on job definitions.
This way, multiple users can contribute to the job while maintaining transparency and accountability.
Any followups are highly appreciated, thanks for taking the time to read.
โ02-12-2024 09:25 PM
Hi @danmlopsmaz , Thanks for bringing up your concerns, always happy to help ๐
I understand the customer wanted to change the creator of the job but at this moment we could change the owner but not the creator. But you should be able to clone an existing job, this will ensure all the configs are replicated and the creator name would be updated.
Kindly refer to this document to copy the job: https://docs.databricks.com/en/archive/dev-tools/cli/jobs-cli.html#create-a-job:~:text=To%20copy%20a....
Please let me know if this helps and leave a like if this helps, followups are appreciated.
Kudos
Ayushi
โ02-13-2024 03:25 AM - edited โ02-13-2024 03:27 AM
Hi @Ayushi_Suthar thanks for such a quick response.
I am aware that we can clone the job to update the creator. The reason why I don't do that is because I want to keep the job "runs". We have a KPI for availability based on the number of successfully job runs vs fails job runs and if I clone the job, I will lose all that information. Also, when someone is not longer working in the Databricks workspace we have this "Unknown" property in the UI:
โ02-13-2024 10:56 PM
Hey @danmlopsmaz
Looking at your concern of maintaining the KPI. I agree that if you clone or re-create the job you will loose the history. A way which I can think of is if you can capture these details of your runs in a separate table. Look at my response above where in I've explained further about this. Due to some technical issues my post was not posted yesterday and it's showing up now.
Let us know if this helps, follow ups are appreciated.
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