@Suraj Tripathi
Thankyou for using Microsoft Q&A platform and thanks for posting your query here.
You can read the value of the variable in the next notebook by using the %run
magic command in the second notebook.
You can use
%run <notebook path>
magic command ormssparkutils.notebook.run()
to reference another notebook within current notebook's context. All the variables defined in the reference notebook are available in the current notebook.
Example1: %run /<path>/Notebook1 { "parameterInt": 1, "parameterFloat": 2.5, "parameterBool": true, "parameterString": "abc" }
.
Example2: mssparkutils.notebook.run("folder/Sample1", 90, {"input": 20 })
For additional details, kindly check :
- Notebook reference
- Reference a notebook
- %run command to reference another notebook with in current notebook in Azure Synapse Analytics
- run() function of notebook module in MSSparkUtils package in Azure Synapse
Hope it helps. Kindly accept the answer if it helps. Thankyou.