cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Root Folder Configuration in Databricks Asset Bundles for DLT Pipelines

Davila
New Contributor II

I'm currently working with Databricks Asset Bundles to deploy my DLT pipelines, but I’ve encountered an issue I can't resolve.

The problem is that I’m unable to configure the root folder within the Asset Bundle in a way that lets me define a custom path for my source code. When I run the deployment, the root folder is incorrectly set to "--", as shown in the image bellow:

Davila_1-1750959884979.png

Here’s how my bundle resource is currently defined:

resources:
  pipelines:
    my_dlt_pipeline:
      name: my_dlt_pipeline
      libraries:
        - file:
            path: ${workspace.file_path}/src/../../../my_file_1.py
        - file:
            path: ${workspace.file_path}/src/../../../my_file_2.py
      configuration:
        bundle.sourcePath: ${workspace.file_path}/src
      serverless: true
      photon: true
      catalog: ${var.my_catalog} 
      target: my_schema
      channel: CURRENT

When I deploy, the files my_file_1.py and my_file_2.py are correctly listed in the UI, but the root folder still appears as "--".

Davila_2-1750960256363.png

Has anyone else faced this issue? How can I properly configure the root folder in the Asset Bundle?

1 REPLY 1

Louis_Frolio
Databricks Employee
Databricks Employee

Hey @Davila , I did some digging and have come with some things you can think about as you work through your issue. Here’s a clear way to think about what you’re seeing and how to proceed.

What’s going on

  • That “Root folder” field in the DLT UI is informational only and is populated when the pipeline’s entry is a notebook path (i.e., libraries: - notebook: { path: ... }).

  • When your pipeline libraries are Python files (libraries: - file: { path: ... }), DLT does not set a root folder in the UI. In that case the UI shows --. This is expected and has no functional impact on the pipeline.

  • The key you’re setting—configuration: bundle.sourcePath—is not a DLT/Workflows-recognized setting for controlling that UI field. (The configuration block passes Spark/Delta configs to the pipeline, but it doesn’t control the “Root folder” display.)

What you can do (practical options)

Option A — Keep using .py files and ignore --

If the pipeline runs and your files are correctly listed (as you showed), you can safely ignore the “Root folder: –”. It’s cosmetic in this mode.

Option B — Use a notebook entrypoint to get a “root” in UI

If you specifically want the UI to show a root folder, make a small entry notebook and import your Python modules from src/:

resources:
  pipelines:
    my_dlt_pipeline:
      name: my_dlt_pipeline
      libraries:
        - notebook:
            path: ${workspace.file_path}/src/entrypoint_notebook
      # You can still keep your .py modules in src/ and import them from the notebook
      catalog: ${var.my_catalog}
      target: my_schema
      channel: CURRENT
      serverless: true
      photon: true

Then in entrypoint_notebook (Python), do your import/dlt definitions and reference code in src/.

 

Option C — Package code as a wheel (cleaner code layout)

Using Bundles, define a wheel artifact and reference it in your pipeline. The UI “root folder” will still be -- (since the entry isn’t a notebook path), but your code organization and dependency management are cleaner.

Small cleanups to your current bundle

You don’t need the ../../../ gymnastics if your code lives under the bundle’s project tree. Using ${workspace.file_path} already points at the uploaded bundle files for the current target:

resources:
  pipelines:
    my_dlt_pipeline:
      name: my_dlt_pipeline
      libraries:
        - file:
            path: ${workspace.file_path}/src/my_file_1.py
        - file:
            path: ${workspace.file_path}/src/my_file_2.py
      # Remove bundle.sourcePath – it won’t affect the UI
      catalog: ${var.my_catalog}
      target: my_schema
      channel: CURRENT
      serverless: true
      photon: true   # (Note: Serverless clusters already run on Photon; leaving this is fine.)

 

TL;DR

  • Seeing “Root folder: –” when using libraries.file is normal and does not affect your pipeline.

  • If you want a populated root folder in the UI, switch your entry to a notebook and import your modules from there.

  • Otherwise, simplify your paths and carry on—your current deployment approach is valid.

 

Hope this helps, Louis.