Home > database >  How to import another module or package in a Databricks delta live tables
How to import another module or package in a Databricks delta live tables

Time:08-01

I am trying to import another module or package in my databricks delta live tables notebook and I am getting an error saying that %run or any magic command is not supported. Just wondering if there is any other way to import the modules or packages.

CodePudding user response:

I could install my own python-packages (that I moved to the DBFS-FileStore before) as well as packages from pip by placing a cell like this at the top of my notebook:

! pip install /dbfs/FileStore/...

and

! pip install openpyxl

CodePudding user response:

As of right now, Delta Live Tables supports installation of libraries via %pip (documentation), so you need to package your code as Python libraries and install it with %pip.

Repos integration is coming...

  • Related