0

I am running the below task to Upload Notebook to Databricks with Azure DevOps release pipeline:

databricks workspace mkdirs //build

databricks workspace import --language PYTHON --format SOURCE
--overwrite _databricks/notebook/$(notebook_name)-$(Build.SourceVersion).py //build/$(notebook_name)-$(Build.SourceVersion).py

but getting the error: Path (//build/helloworld-04747aa082426141c5c286fbe5eab2d7d1bd5983.py) contains empty name

2020-05-16T18:54:01.5665867Z ##[section]Starting: Upload Notebook to Databricks
2020-05-16T18:54:01.5831890Z ==============================================================================
2020-05-16T18:54:01.5832257Z Task         : Bash
2020-05-16T18:54:01.5832539Z Description  : Run a Bash script on macOS, Linux, or Windows
2020-05-16T18:54:01.5832833Z Version      : 3.163.2
2020-05-16T18:54:01.5833073Z Author       : Microsoft Corporation
2020-05-16T18:54:01.5833436Z Help         : https://learn.microsoft.com/azure/devops/pipelines/tasks/utility/bash
2020-05-16T18:54:01.5833824Z ==============================================================================
2020-05-16T18:54:01.8378449Z Generating script.
2020-05-16T18:54:01.8525502Z [command]"C:\Program Files\Git\bin\bash.exe" --noprofile --norc -c pwd
2020-05-16T18:54:01.8915864Z /d/a/_temp
2020-05-16T18:54:01.8975224Z 
2020-05-16T18:54:01.9001870Z ========================== Starting Command Output ===========================
2020-05-16T18:54:01.9009310Z [command]"C:\Program Files\Git\bin\bash.exe" --noprofile --norc /d/a/_temp/5c6b246a-d6b4-45f3-9c35-c1f64320d54b.sh
2020-05-16T18:54:09.0829994Z **Error: b'{"error_code":"INVALID_PARAMETER_VALUE","message":"Path (//build/helloworld-04747aa082426141c5c286fbe5eab2d7d1bd5983.py) contains empty name"}'**
2020-05-16T18:54:09.1242892Z 
2020-05-16T18:54:09.1369153Z ##[error]Bash exited with code '1'.
2020-05-16T18:54:09.1385662Z ##[section]Finishing: Upload Notebook to Databricks

Surprisingly, the same code was running fine without any error for other peoples.

Nothing found from google search. Any idea/clue/suggestion? Thanks

Leo Liu
  • 71,098
  • 10
  • 114
  • 135

2 Answers2

1

You are experiencing this error message due to incorrect path specified i.e. (//build). Make sure you pass the correct path i.e. (/build).

enter image description here

I would suggest you to correct the task to Upload Notebook to Databricks with Azure DevOps release pipeline as shown below:

databricks workspace mkdirs /build
databricks workspace import --language PYTHON --format SOURCE --overwrite _databricks-example/notebook/$(notebook_name)-$(Build.SourceVersion).py /build/$(notebook_name)-$(Build.SourceVersion).py
CHEEKATLAPRADEEP
  • 12,191
  • 1
  • 19
  • 42
  • Please refer to https://developercommunity.visualstudio.com/content/problem/654699/azure-devops-integration-error.html That is the error if "//" is not used – user13557676 May 21 '20 at 15:59
0

I had faced similar issue like mentioned in -: https://forums.databricks.com/questions/39420/path-contains-empty-name.html

This is because you might be using windows hosted agent. This can be solved by changing agent to use ubuntu. I used ubuntu 1604 (ubuntu-16.04). Please use the path as mentioned below (no need to add "/" infront)

databricks workspace mkdirs /build databricks workspace import --language PYTHON --format SOURCE --overwrite _databricks-example/notebook/$(notebook_name)-$(Build.SourceVersion).py /build/$(notebook_name)-$(Build.SourceVersion).py

I Hope this helps you solve it. Cheers!

snapshot of agent used in ADO pipeline

Anish Sarangi
  • 172
  • 1
  • 14