<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Databricks Asset Bundle artifacts with module out of the bundle root (sync path) in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/databricks-asset-bundle-artifacts-with-module-out-of-the-bundle/m-p/98683#M39800</link>
    <description>&lt;P&gt;Hello everyone!&lt;BR /&gt;I’m currently working on a project with shared functionalities across different Databricks bundles. I have separate folders for each bundle, along with a common libs/ folder that holds some Python modules intended to be shared across bundles. My directory structure looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;backend/
├── libs/
│   ├── new_package/
│   │   ├── src/
│   │   │   └── new_package/
│   │   │       ├── __init__.py
│   │   │       └── functions.py
│   │   ├── tests/
│   │   ├── README.md 
│   │   ├── requirements.txt    
│   │   └── pyproject.toml
│   │
│   └── second_package/
│       ├── src/
│       │   └── second_package/
│       │       ├── __init__.py
│       │       └── functions.py
│       ├── tests/
│       ├── README.md 
│       ├── requirements.txt    
│       └── pyproject.toml
│
├── bundle_1/
│   ├── jobs/
│   ├── tests/
│   ├── README.md
│   ├── requirements.txt
│   └── databricks.yml
│
└── bundle_2/
    ├── jobs/
    ├── tests/
    ├── README.md
    ├── requirements.txt
    └── databricks.yml&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I’m using Databricks artifacts to build the wheel as per the&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/bundles/python-wheel" target="_self"&gt;documentation&lt;/A&gt;. Since my modules reside outside of the bundle root, I use the &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/bundles/settings#paths" target="_self"&gt;&lt;EM&gt;sync paths&lt;/EM&gt; mapping&lt;/A&gt; to include files located outside the bundle root. However, when I try deploying from the CLI, I encounter this error:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;EM&gt;Error: build failed default, error: chdir C:\Users\***\python_monorepo\bundle_1\libs\new_package: The system cannot find the path specified., output:&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;It seems that the bundle is unable to access the external module. Here’s my databricks.yml configuration:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;bundle:
  name: deploy-package-job
resources:
  jobs:
    deploy-package-job: 
      name: deploy-package-job
      job_clusters:
        - job_cluster_key: common-cluster
          new_cluster:
            spark_version: 13.3.x-scala2.12
            node_type_id: Standard_DS3_v2
            num_workers: 1
      tasks:
        - task_key: notebook-task
          job_cluster_key: common-cluster
          notebook_task:
            notebook_path: ./jobs/notebook.ipynb
          libraries:
            - whl: ../libs/dist/*.whl
sync:
  paths:
    - ../libs
artifacts:
  default:
    type: whl
    build: python -m build
    path: ../libs/new_package

targets:
  dev:
    mode: development
    default: true
    workspace:
      host: https://***

  prod:
    mode: production
    workspace:
      host: https://***&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have suggestions or insights on why the bundle can’t locate the external module? Any advice would be greatly appreciated!&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Wed, 13 Nov 2024 14:41:27 GMT</pubDate>
    <dc:creator>Jorge3</dc:creator>
    <dc:date>2024-11-13T14:41:27Z</dc:date>
    <item>
      <title>Databricks Asset Bundle artifacts with module out of the bundle root (sync path)</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-asset-bundle-artifacts-with-module-out-of-the-bundle/m-p/98683#M39800</link>
      <description>&lt;P&gt;Hello everyone!&lt;BR /&gt;I’m currently working on a project with shared functionalities across different Databricks bundles. I have separate folders for each bundle, along with a common libs/ folder that holds some Python modules intended to be shared across bundles. My directory structure looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;backend/
├── libs/
│   ├── new_package/
│   │   ├── src/
│   │   │   └── new_package/
│   │   │       ├── __init__.py
│   │   │       └── functions.py
│   │   ├── tests/
│   │   ├── README.md 
│   │   ├── requirements.txt    
│   │   └── pyproject.toml
│   │
│   └── second_package/
│       ├── src/
│       │   └── second_package/
│       │       ├── __init__.py
│       │       └── functions.py
│       ├── tests/
│       ├── README.md 
│       ├── requirements.txt    
│       └── pyproject.toml
│
├── bundle_1/
│   ├── jobs/
│   ├── tests/
│   ├── README.md
│   ├── requirements.txt
│   └── databricks.yml
│
└── bundle_2/
    ├── jobs/
    ├── tests/
    ├── README.md
    ├── requirements.txt
    └── databricks.yml&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I’m using Databricks artifacts to build the wheel as per the&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/bundles/python-wheel" target="_self"&gt;documentation&lt;/A&gt;. Since my modules reside outside of the bundle root, I use the &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/bundles/settings#paths" target="_self"&gt;&lt;EM&gt;sync paths&lt;/EM&gt; mapping&lt;/A&gt; to include files located outside the bundle root. However, when I try deploying from the CLI, I encounter this error:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;EM&gt;Error: build failed default, error: chdir C:\Users\***\python_monorepo\bundle_1\libs\new_package: The system cannot find the path specified., output:&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;It seems that the bundle is unable to access the external module. Here’s my databricks.yml configuration:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;bundle:
  name: deploy-package-job
resources:
  jobs:
    deploy-package-job: 
      name: deploy-package-job
      job_clusters:
        - job_cluster_key: common-cluster
          new_cluster:
            spark_version: 13.3.x-scala2.12
            node_type_id: Standard_DS3_v2
            num_workers: 1
      tasks:
        - task_key: notebook-task
          job_cluster_key: common-cluster
          notebook_task:
            notebook_path: ./jobs/notebook.ipynb
          libraries:
            - whl: ../libs/dist/*.whl
sync:
  paths:
    - ../libs
artifacts:
  default:
    type: whl
    build: python -m build
    path: ../libs/new_package

targets:
  dev:
    mode: development
    default: true
    workspace:
      host: https://***

  prod:
    mode: production
    workspace:
      host: https://***&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have suggestions or insights on why the bundle can’t locate the external module? Any advice would be greatly appreciated!&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 14:41:27 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-asset-bundle-artifacts-with-module-out-of-the-bundle/m-p/98683#M39800</guid>
      <dc:creator>Jorge3</dc:creator>
      <dc:date>2024-11-13T14:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks Asset Bundle artifacts with module out of the bundle root (sync path)</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-asset-bundle-artifacts-with-module-out-of-the-bundle/m-p/102094#M40962</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/102343"&gt;@Jorge3&lt;/a&gt;,&amp;nbsp;where you able to get this issue resolved?&lt;/P&gt;
&lt;P&gt;I believe your artifact build path points outside the synced directory structure, and after syncing ../libs, libs should be available within the bundle root, so the artifact path should be updated accordingly. For example:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;sync:
  paths:
    - ../libs

artifacts:
  default:
    type: whl
    build: python -m build
    path: libs/new_package&lt;/LI-CODE&gt;
&lt;P&gt;To further elaborate about this theory, the artifacts.path is using ../libs/new_package, which references a directory above your bundle’s root directory. Once the sync process maps ../libs into your bundle’s local environment, the synced files appear as a subdirectory (libs/) inside the bundle root. Since the build process runs relative to the bundle root, using ../libs/new_package tries to access a location outside the newly synced directory structure. By changing ../libs/new_package to libs/new_package, you point directly to the synced module directory now located inside the bundle’s environment, ensuring the build command can find and build the wheel without encountering a "path not found" error. Hope it helps.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2024 15:59:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-asset-bundle-artifacts-with-module-out-of-the-bundle/m-p/102094#M40962</guid>
      <dc:creator>VZLA</dc:creator>
      <dc:date>2024-12-13T15:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks Asset Bundle artifacts with module out of the bundle root (sync path)</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-asset-bundle-artifacts-with-module-out-of-the-bundle/m-p/114400#M44806</link>
      <description>&lt;P&gt;Sorry for the late response, since I've abandoned that project since then.&lt;/P&gt;&lt;P&gt;Thanks for the answer &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/34618"&gt;@VZLA&lt;/a&gt;&amp;nbsp;, but I've tried today the way you suggested and it's not working either. The error I got is:&lt;BR /&gt;&lt;EM&gt;Error: directory libs/new_versiro_package not found&lt;/EM&gt;&lt;BR /&gt;I got the same error from the validation and the deploy commands&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 13:07:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-asset-bundle-artifacts-with-module-out-of-the-bundle/m-p/114400#M44806</guid>
      <dc:creator>Jorge3</dc:creator>
      <dc:date>2025-04-03T13:07:26Z</dc:date>
    </item>
  </channel>
</rss>

