create one session in Synapse Analytics that multiple notebooks can use

Farrukh Tashpulatov 81 Reputation points
2021-11-09T08:31:48.39+00:00

Hello,

It seems that a new Spark session is automatically created for every new notebook in Azure Synapse Analytics.

Is there a way to manually create one session and share it across multiple notebooks (in a pipeline for example)?

I found a similar question here with no answer

Thanks in advance!

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.
5,373 questions
0 comments No comments
{count} votes

Accepted answer
  1. PRADEEPCHEEKATLA 90,641 Reputation points Moderator
    2021-11-09T17:14:04.673+00:00

    Hello @Farrukh Tashpulatov ,

    Thanks for the question and using MS Q&A platform.

    Currently it’s not been supported yet.

    Alternate method: I suggest you can try to use mssparkutils.notebook.run to see if it meets your requirement. Create a new notebook and put your ForEach logic into the new created notebook.

    Python code cell as example:

       for notebook in notebookNames:  
              mssparkutils.notebook.run(notebook)  
    

    For more details, refer to Introduction to Microsoft Spark utilities - Azure Synapse Analytics | Microsoft Learn

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.