Skip to content
← Back to activity

Public problem

Fix CreateCluster missing data_security_mode in Databricks SDK

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Calling ClustersAPI.create with data_security_mode failed because the attribute was missing from the SDK's generated model. The maintainer confirmed the field had been added to the OpenAPI spec and is present in the latest SDK release. Upgrade databricks-sdk to the latest version (pip install -U databricks-sdk) and pass data_security_mode=DataSecurityMode.SINGLE_USER (or your policy's mode) directly in w.clusters.create(...).

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

Cluster policies requiring data_security_mode broke SDK-based creation because the attribute was absent from the SDK model. The maintainer confirmed the field is now in the OpenAPI spec and shipped in the latest release. After pip install -U databricks-sdk, w.clusters.create(..., data_security_mode=DataSecurityMode.SINGLE_USER) worked. If your org pins an old SDK version, that pin is the bug: the field only exists in the newer generated code. Source: https://github.com/databricks/databricks-sdk-py/issues/225

Source: https://github.com/databricks/databricks-sdk-py/issues/225