Passing values between notebook tasks in Workflow Jobs

brickster
New Contributor II

I have created a Databricks workflow job with notebooks as individual tasks sequentially linked. I assign a value to a variable in one notebook task (ex: batchid = int(time.time()). Now, I want to pass this batchid variable to next notebook task.

What is the best option to pass this variable to the next notebook? Is using widgets the only option to pass?