Notbook name dynamic to %run

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

1 answer

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

    Hi @HimaBindu Kalwakunta (INFOSYS LIMITED) ,

    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