Synapse Notebook reference - how to use %run

alex feng 86 Reputation points
2021-08-13T06:54:21.96+00:00

I'm trying to use the Azure Synapse notebook reference described here:

https://learn.microsoft.com/en-us/azure/synapse-analytics/spark/apache-spark-development-using-notebooks?tabs=preview#notebook-reference

Here is my setup, notebook_1 and notebook_2 are both under root folder of Synapse notebooks. Both notebooks have been published.

I have a notebook_1 published in workspace and then trying to call it in notebook_2 using

%run 'notebook_1'

Got an error saying:

MagicUsageError: Cannot read notebook 'notebook_1'. The possible reason is that the notebook doesn't exist.

I have tried other varieties like 'notebook_1.ipynb', './notebook_1.ipynb', no luck.

Could anyone give some advice on the proper way of doing that? Many thanks.

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,369 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vaibhav Chaudhari 38,576 Reputation points
    2021-08-13T07:12:09.653+00:00

    Can you simply run without single quotes-

    122868-image.png

    ----------

    Please don't forget to Accept Answer and Up-vote if the response helped -- Vaibhav


2 additional answers

Sort by: Most helpful
  1. Rodrigo de Sousa Silva 6 Reputation points
    2023-01-12T15:16:32.9533333+00:00

    In the notebook properties tab, there is the option to "enable unpublished notebook reference", after checking the box, it will be possible to use %run notebook_1Captura de tela 2023-01-12 121408

    1 person found this answer helpful.
    0 comments No comments

  2. Øyvind Rogne-Jensrud 1 Reputation point
    2022-09-14T13:17:30.563+00:00

    I tried. It does not work

    241050-image.png

    0 comments No comments