shr_ath
New Contributor II

Hi @ThiagoLDC ,
In order to import a user defined module, the .py file either needs to be in the same directory or you can place your file in Repo and import it form there. 
In the notebook while importing the code form Repo you can import it like below:

import sys, os
sys.path.append(os.path.abspath('<module-path>'))
from <pyfilename> import <class/function>

for detailed documentation refer 
https://docs.databricks.com/en/delta-live-tables/import-workspace-files.html