Notbook name dynamic to %run

73745420 6 Reputation points Microsoft External Staff
2022-10-27T21:58:51.96+00:00

Hi

how to pass notebook name dynamically to %run magic command

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

1 answer

Sort by: Most helpful
  1. ShaikMaheer-MSFT 38,551 Reputation points Microsoft Employee Moderator
    2022-10-28T16:16:41.873+00:00

    Hi @73745420 ,

    Thank you for posting query in Microsoft Q&A Platform.

    Using %run command we cannot do that.

    You can consider using mssparkutils.notebook.run() function to run another notebook by dynamically passing notebook name using variables or parameters.

    255184-image.png

    Below are few useful videos for reference.

    Hope this helps. Please let me 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

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.