if you have thought about making your code inside databricks and notebooks more reusable and organized and you have thought about implementing a design pattern or class level separation in databricks the answer is yes, I am going to tell you the details of how to do it, the advantages and disadvantages.
if it is possible to handle different notebooks where you implement your logic at the class level or patterns as you want to implement it
with the sentence %run ../Folder/name_notebook you can make the "import" of your class, what this sentence does is that it executes your notebook and if there you have the implementation of a class you can make use of it.
benefits
- more organized code
- reuse code
- maintainability of the solution
- use of good programming practices
- being able to access complex objects that help you perform processes
disadvantages
- defining a large class in a single cell
- when you are managing a version control you may not be able to see the changes from databricks because usually the classes are very large so you will have to commit to see the changes directly in the version control or go to the specific notebook and look up the history
- error checking in some occasions or as you consume your methods or classes it may be complex to check errors or debug the code.