Forum Discussion
Referencing notebook exit value as a variable in a data pipeline
- 2 years ago
For my own implementation the delimited string just wasnt flexible enough - so here's a version using a JSON object as the notebook return value:
Notebook pyspark:
lResult={"numUpdated":10,"message":"success","fruit":["apple","orange","grapes"]} mssparkutils.notebook.exit(str(lResult))Expression for varMessageStr:
Anonymous(activity('Test Notebook').output.result.exitValue).messageExpression for varNumUpdatedInt:
INT(json(activity('Test Notebook').output.result.exitValue).numUpdated)Expression for varFruitArray:
Anonymous(activity('Test Notebook').output.result.exitValue).fruit
Hi Ostrzak
We can pass multiple parameters from Notebook to a pipeline using list of parameters. I have attached the screenshots along with the steps for your reference.
1) Create a list of parameters inside a notebook.
2) Using notebook and set variable activites we can pass the parameters to a pipeline.
I hope this information is helpful. Please do let us know if you have any questions.
Thank you for this infomation v-cboorla-msft .
Can you also help specifying what is the type specified for the variable and what is the expression used in the set variable please?
Thanks,
Prabhat