0
votes

I'm having an issue with a DevOps pipeline when trying to import notebooks to databricks. Using Azure CLI and Bash, here is the code:

- task: AzureCLI@2
  inputs:
    azureSubscription: 'XXXX'
    scriptType: 'bash'
    scriptLocation: 'inlineScript'
    inlineScript: |
      python -m pip install --upgrade pip setuptools wheel databricks-cli==0.11.0
      DatabricksUrl='$(workspaceUrl)'
      dapiToken='$(devops-pat-uat)'
      changedCode='$(System.DefaultWorkingDirectory)\Code\Databricks'
      
      databricks configure --token <<EOF
      ${DatabricksUrl}
      ${dapiToken}
      EOF

      databricks workspace import_dir -o "$changedCode" "/Shared"

Error: {'error_code': 'INVALID_PARAMETER_VALUE', 'message': "Path (C:/Program Files/Git/) doesn't start with '/'"}

I'm not sure why the path is changing from "/Shared" to "C:/Program Files/Git/Shared". Has anyone seen this issue before?

1

1 Answers

0
votes

Azure pipeline issue running databricks workspace import_dir

According to the error message:

"Path (C:/Program Files/Git/) doesn't start with '/'"}

Please try to add an extra "/" to the code:

databricks workspace import_dir -o "$changedCode" "//Shared"