MadhuB
Valued Contributor

@carlos_tasayco There are two methods on how you can pass a variable to the other notebooks as input.

  1. Using Widgets
  2. using collect method like below.

 

# In notebook1
result = spark.sql("SELECT value FROM table").collect()[0][0]
dbutils.notebook.exit(result)

# In notebook2 
value = dbutils.notebook.run("notebook1", timeout_seconds=60)​

 

Let me know for anything else.