cancel
Showing results for 
Search instead for 
Did you mean: 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 

Databricks Asset Bundles + Artifacts + Poetry

Fiabane
New Contributor II

Hello,

I've configured the DABs on our project successfully. Moreover, I could switch from setuptools to poetry almost successfully. In the project's databricks.yml I configured it as the documentation suggested, I've just changed the name of the artifact:

Spoiler
artifacts:
    config:
       type: whl
       build: poetry build
       path: .

The class that I want to 'compile' as a package/module is in the project's root/config folder:

Spoiler
project/
├── config/
│     ├── __init__.py
│     └── env_manager.py
├── pyproject.toml
├── poetry.lock

Also, in the codepipeline template (AWS), I needed to add the following commands (which were not mentioned in the documentation):

Spoiler
- sudo apt update
- sudo apt install -y pipx
- pipx install poetry
- pipx ensurepath
- export PATH="$PATH:/root/.local/bin"
- poetry --version

The deployment was done (shown in the Figure below).

Fiabane_0-1729111836436.png

However, when I tried to run the job I got ModuleNotFoundError: No module named 'config' error message.

The way I am calling it on the files is: import config.env_manager as workspace

Any help would be greatly appreciated.

0 REPLIES 0

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group