Forum Discussion
Fabric Notebook ExitValue how to select specific values
- 6 months ago
Hi Ka13 ,
Yes we can read this query in a copy activity. First convert this select query to json
import jsonfrom notebookutils import notebooknb_result = {"select_query": select_query}notebook.exit(json.dumps(nb_result))Then in pipeline add notebook activity and connect to copy data. In the dynamic content of copy data, add this json expression.
@json(activity('Notebook1').output.exitValue).select_queryThis works.
If this post helps, please accept this as a solution. Appreciate your kudos.
Thanks,
Pallavi_r
Hi Pallavi, can we pass this formed select query in next Copy Activity?
Hi Ka13 ,
Yes we can read this query in a copy activity. First convert this select query to json
|
import json
from notebookutils import notebook
nb_result = {
"select_query": select_query
}
notebook.exit(json.dumps(nb_result))
|
Then in pipeline add notebook activity and connect to copy data. In the dynamic content of copy data, add this json expression.
|
@json(activity('Notebook1').output.exitValue).select_query
|
This works.
If this post helps, please accept this as a solution. Appreciate your kudos.
Thanks,
Pallavi_r
- Ka136 months agoHelper II
Thanks Pallavi tested above it's working