Ecedysis
New Contributor II

Works for me to upload my python file to dbfs using the databricks CLI:

dbfs cp mymodule.py dbfs:/path/to/module/mymodule.py --overwrite

Then the following works:

import sys
sys.path.append('/dbfs/path/to/module')
#the file is /dbfs/path/to/module/mymodule.py
import mymodule