Hi @dbx_687_3__1b3Q ,
Yes, you can create a Databricks Asset Bundle (DAB) from an existing workspace that contains pipelines, notebooks, tables, and other Databricks assets.
To create a DAB from an existing workspace, you can use the Databricks CLI and follow these steps:
-
Install the Databricks CLI and authenticate with your Databricks workspace. For detailed instructions, see Databricks CLI Quickstart.
-
Using the command, export your desired assets as a Databricks Archive (DBA) file. For example, the following command exports a notebook named my_notebook
to a DBA file named my_archive.dbc
:
databricks workspace export --format dbc --path "/Users/my_username/my_notebook" --output my_archive.dbc
- Create a Databricks Asset Bundle (DAB) by using the
databricks bundles create
command. You can specify the name and version of the bundle and the DBA file created in step 2. For example, the following command creates a DAB named my_bundle
version 1.0.0 using the DBA file my_archive.dbc
:
databricks bundles create --name my_bundle --version 1.0.0 my_archive.dbc
- Deploy the DAB to your target environment using the
databricks bundles deploy
command. You can specify the domain and version to deploy. For example, the following command deploys version 1.0.0 my_bundle
to the test
environment:
databricks bundles deploy --environment test --version 1.0.0 my_bundle
Note that you need the appropriate permissions to deploy bundles in your target workspace.
For more information about creating and deploying Databricks Asset Bundles using the Databricks CLI, see Databricks CLI and Bundles.