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: 

Databricks CLI binding storage credential to a workspace

tt_921
New Contributor II

In the documentation from Databricks it says to run the below for binding a storage credential to a workspace (after already completing step 1 to update the `isolation-mode` to be `ISOLATED`): 

databricks workspace-bindings update-bindings storage-credential <my-storage-credential> \
--json '{
  "add": [{"workspace_id": <workspace-id>}...],
  "remove": [{"workspace_id": <workspace-id>}...]
}' --profile <profile-name>

However, when running this (with my <storage-credential>, <workspace-id>, and <profile-name>) I receive an error: 

 

Error: Supported binding types for STORAGE_CREDENTIAL are BINDING_TYPE_READ_WRITE

 

It explicitly states in the documentation that you don't even need to specify a `binding_type` in the json as the read-only binding is not available for storage credentials. But I receive this error which seems as if I have set an incorrect binding type, even though I have not set one at all. I am confident in the rest of the syntax and authentication, because if I add the workspace binding manually in the Databricks UI I can run this same command to "remove" the binding and it runs successfully.

If I do include the `binding_type` of `BINDING_TYPE_READ_WRITE` in the json, I receive an error 

 

Error: assigned workspace 0 does not exist or is not assigned the same metastore as the current workspace.

 

Is the documentation incorrect, or is there a bug in workspace binding for storage-credentials via the CLI?

2 REPLIES 2

AbhaySingh
Databricks Employee
Databricks Employee

This appears to be a documentation inconsistency. The CLI implementation seems to:

  1. Require binding_type to be explicitly specified (contradicting the docs)

  2. Require it to be placed within each workspace object, not as a top-level parameter

 

 The fact that removing bindings works suggests the CLI can parse the structure correctly for remove operations but has stricter  requirements for add operations.

 

  Additional Verification Steps

 

  Could you share:

 

  1. Are you using numeric workspace_id or string? Try ensuring it's numeric without quotes

  2. Which version of the Databricks CLI are you using? 

 

This would help confirm if it's a CLI version-specific issue or a persistent bug in the workspace bindings implementation.

tt_921
New Contributor II

Thank you @AbhaySingh for your response.

Databricks CLI version: Databricks CLI v0.274.0 

I am using a numeric workspace_id, which had worked for the removal of bindings. I tried adding a binding now with string in quotes and received the same errors as before. First without specifying any binding type:

 

Error: Supported binding types for STORAGE_CREDENTIAL are BINDING_TYPE_READ_WRITE

 

And second when specifying BINDING_TYPE_READ_WRITE, which is placed within each workspace object, not as a top-level parameter:

 

Error: assigned workspace 0 does not exist or is not assigned the same metastore as the current workspace

 

 

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