Forum Discussion

VickyDev18's avatar
VickyDev18
Advocate II
2 years ago
Solved

Call one notebook from another with parameters

I have this simple notebook to load data from an xlsx file in a lakehouse to a delta table in the Lakehouse.    How can I make this reusable/parameterized so I call it from another notebook and pas...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi VickyDev18 
    Thanks for using Fabric Community.
    You can call one notebook from another notebook using %run command. I have created a repro of the same but instead I used a CSV file. I have attached the screenshots of the code.

    Functions is my child notebook where I am defining a function to create a table inside lakehouse using the data inside a CSV file.

    I am calling this notebook from another notebook:

    The table got created in the lakehouse.


    Hope this helps. Please let me know if you have any further questions.