How to run a notebook in a .py file in databricks

Littlesheep_
New Contributor

The situation is that my colleague was using pycharm and now needs to adapt to databricks. They are now doing their job by connecting VScode to databricks and run the .py file using databricks clusters.

The problem is they want to call a notebook in databricks in the .py file in VScode, the %run command is not working because this command only works in notebook. I am wondering if there is a way to do it?

Thanks so much!