Databricks App with DAB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2025 06:06 PM
Hi All,
I am trying to deploy a DBX APP via DAB, however source_code_path seems not to be parsed correctly to the app configuration.
- dbx_dash/
-- resources/
---- app.yml
-- src/
---- app.yaml
---- app.py
-- databricks.yml
resources/app.yml:
resources:
apps: my_app:
name: "my_app"
description: "My First APP"
# The location of the source code for the app
source_code_path: ../src
targets:
dev:
workspace:
root_path: /Workspace/Users/my_user@domain.com/my_app
databricks.yml:
bundle:
name: apps
include:
- resources/*.yml
targets:
dev:
mode: development
default: true
workspace:
host: https://my_host.com
The src folder, when deployed, goes to a folder called files/ in my workspace. However, the app has /Workspace/Users/my_user@domain.com/my_app as the source_path_code, which differs from the correct src path which is /Workspace/Users/my_user@domain.com/my_app/files/src.
Is there anything that I am missing here?
Thank you!
Adriana Cavalcanti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2025 08:52 PM
It seems to be issue with relative path
source_code_path: ../src
This does not match the actual path where the source code is being deployed in the Databricks workspace (/Workspace/Users/my_user@domain.com/my_app/files/src). This mismatch could lead to the app being unable to locate the files in the expected path.
By default, deploying a Databricks Asset Bundle (DAB) might append additional directory structures like files/ depending on the bundle structure.
To fix this Review databricks.yml Configuration:
- Confirm that the
root_pathin yourdatabricks.ymlfile is consistent with how you want the app deployed. For instance, it could be necessary to append/filesto theroot_pathif thesrc/folder is being nested underfiles/during deployment.
After making the above changes, redeploy the bundle using the following command:
databricks bundle deploy -t dev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2025 09:51 PM
Hi NandiniN,
Thanks for your reply.
The more folders I add to root_path (my_user@domain.com/my_app/files/src), the deeper the hierarchy becomes to reach the app (/Workspace/Users/my_user@domain.com/my_app/files/src/files/src), and source path continues to be /Workspace/Users/my_user@domain.com/my_app.
Is there anything else that I can look into?
Appreciate your assistance,
Adriana Cavalcanti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2025 11:40 PM
Hi Adriana,
Have you adjusted the root_path in your databricks.yml
Kindly add /Workspace and entire path to the root_path
Thanks