cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Workspace API

CaptainJack
New Contributor III

Hello friends. 

I am having problem with Workspace API. I have many folders inside my /Workspace (200+) which I would like to copy my Program, whole Program folder, which includes 20 spark scripts are Databricks notebooks. I tried Workspace API and I am getting this error:

Could not parse request objectL Failed to Decode VALUE_STRING as base 64.

How could I decode it as base64. Please take a note that these are Databricks notebooks. Thanks everyone for help.

my_body looks like that

payload = {
"path": "/Workspace/Destination/Program",
"format": "SOURCE",
"language": "Python",
"content": "/Workspace/Source/Program",
"overwrite": True
}

 

response = requests.post("{}{}".format(workspace_url, api), data=json.dumps(payload), headers=auth)

1 REPLY 1

CaptainJack
New Contributor III

I am using this as api = /api/2.0/workspace/import

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group