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: 

issue on databricks bundle deploy

Miloud_G
New Contributor III

Hi

I am trying to configure Databricks Asset Bundle, but got error on deployment

Databricks bundle init ----------- OK

Databricks bundle validate ----- OK

Databricks bundle deploy ------ Fail

error : 

PS C:\Databricks_DABs\DABs_Init\DABS_Init> databricks bundle deploy
Uploading bundle files to /Workspace/Users/workEmail@cc/.bundle/DABS_Init/dev/files...
Error: Operation not supported because Files in Workspace is disabled. Please refresh the page if applicable

 databricks.yml

# This is a Databricks asset bundle definition for DABS_Init.
bundle:
  name: DABS_Init
  uuid: workspaceID

include:
  - resources/*.yml

targets:
  dev:
    # The default target uses 'mode: development' to create a development copy.
    # - Deployed resources get prefixed with '[dev my_user_name]'
    # - Any job schedules and triggers are paused by default.
    mode: development
    default: true
    workspace:
      host: https://???????????.azuredatabricks.net
      # We explicitly deploy to /Workspace/Users/workEmail to make sure we only have a single copy.
      root_path: /Workspace/Users/WorkEmail/.bundle/${bundle.name}/${bundle.target}
    permissions:
      - user_name: WorkEmail
        level: CAN_MANAGE
1 ACCEPTED SOLUTION

Accepted Solutions

Miloud_G
New Contributor III

Thank you Advila

I was enable to enable worspace files with scrip :

from databricks.sdk.core import ApiClient
client = ApiClient()
client.do("PATCH", "/api/2.0/workspace-conf", body={"enableWorkspaceFilesystem": "true"}, headers={"Content-Type": "application/json"})
 
the command client = ApiClient() give error (TypeError: ApiClient.__init__() missing 1 required positional argument: 'cfg')
problem fixed with shell command :

%sh
curl -s -X PATCH -H "Authorization: Bearer $DATABRICKS_TOKEN" $DATABRICKS_INSTANCE/api/2.0/workspace-conf -d '{ "enableWorkspaceFilesystem": "true" }'

 

 

View solution in original post

2 REPLIES 2

Advika
Databricks Employee
Databricks Employee

Hello @Miloud_G!

The error indicates that file operations in your workspace are currently disabled. Contact your workspace administrator to check if the Workspace Files feature can be turned on.

For more information, you can refer to the official documentation:
- Requirements
Enable workspace files

Miloud_G
New Contributor III

Thank you Advila

I was enable to enable worspace files with scrip :

from databricks.sdk.core import ApiClient
client = ApiClient()
client.do("PATCH", "/api/2.0/workspace-conf", body={"enableWorkspaceFilesystem": "true"}, headers={"Content-Type": "application/json"})
 
the command client = ApiClient() give error (TypeError: ApiClient.__init__() missing 1 required positional argument: 'cfg')
problem fixed with shell command :

%sh
curl -s -X PATCH -H "Authorization: Bearer $DATABRICKS_TOKEN" $DATABRICKS_INSTANCE/api/2.0/workspace-conf -d '{ "enableWorkspaceFilesystem": "true" }'

 

 

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now