- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2024 08:35 AM
Using workflows, is there a way to obtain the task name from within a task?
EX: I have a workflow with a notebook task. From within that notebook task I would like to retrieve the task name so I can use it for a variety of purposes.
Currently, we're requiring users to pass the task name into he task using a task parameter. That works, but is another point of configuration and error-prone.
We'd like to obtain the task name from within the task at runtime.
This was asked in a prior conversation (https://community.databricks.com/t5/warehousing-analytics/from-within-a-databricks-notebook-how-do-y...), but not answered.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2024 08:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2024 02:00 PM
@EWhitley - could you please try using jobs API - /api/2.1/jobs/get and look for task_key fields to obtain all the task name within a given job.
Reference - https://docs.databricks.com/api/workspace/jobs/get
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2024 08:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Apologies for responding so late on this. This is exactly what I needed. 😀
![](/skins/images/8C2A30E5B696B676846234E4B14F2C7B/responsive_peak/images/icon_anonymous_message.png)
![](/skins/images/8C2A30E5B696B676846234E4B14F2C7B/responsive_peak/images/icon_anonymous_message.png)