Hi @Jesse Horn-Artera
Thank you for the question and using Microsoft Q&A platform.
It seems like you are having trouble running a notebook in Synapse live that is not sharing the same path. Based on the error message you provided, it seems like the file 'sm/cc/cc_exceptions' is not found. To use %run magic command to reference another notebook within the current notebook's context, you need to provide an absolute path or notebook name only as a parameter. Relative path is not supported.
You mentioned that you have tried with and without quotes and with and without a "/" in front. Have you tried providing the full absolute path of the notebook you want to reference?
For example, if the notebook you want to reference is located at /path/to/notebook/Notebook1, you can use the following command to reference it:
%run /path/to/notebook/Notebook1
I have tried the above and was successful in running the pipeline without any errors:
I have 2 notebooks Notebook1 and Notebook2. I am calling Notebook1 from Notebook2 using the absolute path:
I have a pipeline which is executing Notebook2 using the notebook activity:
Here are a few steps and considerations that might help resolve the problem:
- Publish Notebooks: Ensure that all notebooks involved are published. Unpublished notebooks might not be accessible in live mode.
- Correct Path: Double-check the path you’re using. The path should be absolute and start with a / if it’s not in the same directory.
- Use mssparkutils.notebook.run: Instead of %run, you can try using mssparkutils.notebook.run which might handle paths differently:
from notebookutils import mssparkutils mssparkutils.notebook.run('/folder/notebook_name')
For more information please refer to the below links:
https://learn.microsoft.com/en-us/answers/questions/1233602/how-to-run-another-synapse-notebook-from-one-synap
https://learn.microsoft.com/en-us/answers/questions/512509/synapse-notebook-reference-how-to-use-run
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.