Forum Discussion
Ka13
7 months agoHelper II
Fabric Notebook ExitValue how to select specific values
Hi, I had a question in the Fabric Notebook. In Fabric Notebook , From the ExitValue below output in Notebook , how to select specific value , like only schema and table and need to select va...
- 7 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
v-prasare
7 months agoCommunity Support
Hi Ka13,
You can pass the formed SELECT query to the next Copy Activity by exiting the notebook with the query as JSON and referencing it using dynamic content in the Copy Activity source. This method works reliably in Fabric pipelines and is the recommended way to execute dynamic SQL from a notebook
Thanks,
prashanth
MS fabric community support
Ka13
6 months agoHelper II
Thanks Prasare, will test and let you know if any issues.