Scenario (in Databricks):
- TaskA is a task of type ‘Notebook’ in Job1 workflow. TaskA utilizes NotebookA.
- Job1 is a first task of type ‘Run_Job’ in Job2 workflow.
- TaskB is a second task of type ‘Notebook’ in Job2. TaskB utilizes NotebookB.
- NotebookB takes an input parameter.
- NotebookB depends on Job1.
Objective: While running Job2, pass a parameter set in NotebookA (nested inside Job1) into NotebookB.
Passing parameter works if both NotebookA and NotebookB belong to a single workflow.
NotebookA sets a task value dbutils.jobs.taskValues.set("key1","value1")
, and then NotebookB retrieves it referencing {{tasks.TaskA.values.key1}}
.
However, if NotebookA is within Job1 task (the desired scenario), then NotebookB does not see the parameter. The attempt to reference this {{tasks.Job1.values.key1}}
fails. The exception thrown: Failed to resolve references: Task value referenced by 'tasks.Job1.values.key1' was not found.
NotebookB should retrieve key1
parameter set in NotebookA
user3071308 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.