Deploying your Bundle to Different Targets - pathfinder-analytics-uk/dab_project GitHub Wiki

Links and Resources


Project Code

databricks.yml

Adding the target for Test and Prod in the databricks.yml file.

Please replace the workspace URL and user_name as per your specific details.

test:
    mode: production
    workspace:
      host: your-workspace-url # replace with your Workspace URL
      # We explicitly specify /Workspace/Users/[email protected] to make sure we only have a single copy.
      root_path: /Workspace/Shared/.bundle/${bundle.name}/${bundle.target}
    permissions:
      - user_name: your-user-name # update with your user name
        level: CAN_MANAGE
    run_as:
      user_name: your-user-name # update with your user name
  prod:
    mode: production
    workspace:
      host: your-workspace-url # replace with your Workspace URL
      # We explicitly specify /Workspace/Users/[email protected] to make sure we only have a single copy.
      root_path: /Workspace/Shared/.bundle/${bundle.name}/${bundle.target}
    permissions:
      - user_name: your-user-name # update with your user name
        level: CAN_MANAGE
    run_as:
      user_name: your-user-name # update with your user name

.databrickscfg Configuration File

Please add the configuration for the PROD workspace

[PROD]
host = your-databricks-host
token = your-databricks-pat

Commands

Deploying to Test

databricks bundle deploy --target TEST

Deploying to Prod

databricks bundle deploy --target PROD