Can I run a specific cell of a particular notebook from another notebook

Jzerf Marqui 21 Reputation points
2022-11-30T10:03:06.553+00:00

Can I run a specific cell of a particular azure notebook from another azure notebook? Is this possible?

Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
2,080 questions
0 comments No comments
{count} votes

Accepted answer
  1. PRADEEPCHEEKATLA-MSFT 85,586 Reputation points Microsoft Employee
    2022-12-01T06:46:15.18+00:00

    Hello @Jzerf Marqui ,

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

    Yes, use widgets to create that logic.

    Example have 1 widget called cellNumber, then create a parameter/variable based on that and use it in each cell, eg if cellNumber = 1 then logic in the cell, and to this for every cell.

    Then when you call the notebook pass whatever cell number you want to execute.
    Please find a basic example as shown below:

    Notebook Cell Logic:

    267169-image.png

    Run Notebook Cell:

    267200-image.png

    For more details, refer to the MS Q&A thread addressing similar issue.

    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 jhow you can be part of Q&A Volunteer Moderators

0 additional answers

Sort by: Most helpful