Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

mssparkutils catch exception

Hello everyone! I want to run a notebook with mssparkutils but want to continue with the code execution if the called notebook run fails, analog to having pipeline items in sequence "upon completion...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

    Thanks for using Fabric Community.
    Below code is working for me -

    Test Notebook 1 -

     


    Test Notebook 2 -

     

    import logging
    
    try:
        mssparkutils.notebook.run("Test Notebook 1")
    except Exception as e:
        logging.exception(e)
        print("it is running")
    

     

     

     


    Hope this is helpful. Do let me know incase of further queries.