Databricks dbx deploy error with authentication token

279 Views Asked by At

I'm trying to deploy a new workflow using the dbx cli from Databricks, when i'm running:

dbx deploy new_workflow

I'm receving the following error:

Exception: Provided configuration is not based on token authentication.Please 
switch to token-based authentication instead.

I already authenticated with databricks-cli so i'm a little bit lost on what to do next

2

There are 2 best solutions below

0
user3480223 On

Its seems you are facing issue with sufficient access permissions to perform task.

Reference: https://docs.databricks.com/en/dev-tools/auth.html

0
Kotka On

I assume that you already fetched dapi token from Databricks user settings -> Access token section. Then, please check that the name of your profile matches the profile name in your dbx project.

Databricks CLI config in the file ~/.databrickscfg

[your-profile-name]
host = <workspace-URL>
token = <token>

Dbx configuration in your-repo/.dbx/project.json file

{
    "environments": {
        "default": {
            "profile": "your-profile-name",
            "storage_type": "mlflow",
            "properties": {
                "workspace_directory": "/Shared/dbx/my_project",
                "artifact_location": "dbfs:/Shared/dbx/projects/my_project"
            }
        }
    }
}

Now, ensure that your-profile-name is spelt the same in both files and has required access to create or update workflow in your Databricks workspace.

Then, your conf/deployment.yml file should look something like this.

build:
   no_build: true

environments:
  default:
    workflows:
      - name: "new_workflow"
        tasks:
          - task_key: "some_task"
            notebook_task:
              notebook_path: "/some/notebook/path"