Skip to content

DatabricksProvider

laktory.models.resources.providers.DatabricksProvider ¤

Bases: BaseProvider, TerraformResource

Databricks Provider

Examples:

from laktory import models

p = models.DatabricksProvider(
    host="adb-4623853922539974.14.azuredatabricks.net",
    token="${vars.DATABRICKS_TOKEN}",
)
PARAMETER DESCRIPTION
account_id

Account Id that could be found in the bottom left corner of Accounts Console.

TYPE: str | VariableType DEFAULT: None

alias

TYPE: str | VariableType DEFAULT: None

auth_type

Enforce specific auth type to be used in very rare cases, where a single provider state manages Databricks workspaces on more than one cloud and More than one authorization method configured error is a false positive. Valid values are pat, basic, azure-client-secret, azure-msi, azure-cli, and databricks-cli.

TYPE: str | VariableType DEFAULT: None

azure_client_id

TYPE: str | VariableType DEFAULT: None

azure_client_secret

TYPE: str | VariableType DEFAULT: None

azure_environment

TYPE: str | VariableType DEFAULT: None

azure_login_app_id

TYPE: str | VariableType DEFAULT: None

azure_tenant_id

TYPE: str | VariableType DEFAULT: None

azure_use_msi

TYPE: bool | VariableType DEFAULT: None

azure_workspace_resource_id

TYPE: str | VariableType DEFAULT: None

client_id

TYPE: str | VariableType DEFAULT: None

client_secret

TYPE: str | VariableType DEFAULT: None

cluster_id

TYPE: str | VariableType DEFAULT: None

config_file

Location of the Databricks CLI credentials file created by databricks configure --token command (~/.databrickscfg by default). Check Databricks CLI documentation for more details. The provider uses configuration file credentials when you don't specify host/token/username/password/azure attributes.

TYPE: str | VariableType DEFAULT: None

databricks_cli_path

TYPE: str | VariableType DEFAULT: None

debug_headers

TYPE: bool | VariableType DEFAULT: None

debug_truncate_bytes

TYPE: int | VariableType DEFAULT: None

google_credentials

TYPE: str | VariableType DEFAULT: None

google_service_account

TYPE: str | VariableType DEFAULT: None

host

This is the host of the Databricks workspace. It is a URL that you use to login to your workspace.

TYPE: str | VariableType DEFAULT: None

http_timeout_seconds

TYPE: int | VariableType DEFAULT: None

metadata_service_url

TYPE: str | VariableType DEFAULT: None

password

This is the user's password that can log into the workspace.

TYPE: str | VariableType DEFAULT: None

profile

Connection profile specified within ~/.databrickscfg. Please check connection profiles section for more details.

TYPE: str | VariableType DEFAULT: None

rate_limit

TYPE: int | VariableType DEFAULT: None

retry_timeout_seconds

TYPE: int | VariableType DEFAULT: None

skip_verify

TYPE: bool | VariableType DEFAULT: None

source

TYPE: str | VariableType DEFAULT: 'databricks/databricks'

token

This is the API token to authenticate into the workspace.

TYPE: str | VariableType DEFAULT: None

username

This is the username of the user that can log into the workspace.

TYPE: str | VariableType DEFAULT: None

version

TYPE: str | VariableType DEFAULT: '>=1.49'

warehouse_id

TYPE: str | VariableType DEFAULT: None

METHOD DESCRIPTION
workspace_client_kwargs

Return kwargs dict suitable for instantiating a Databricks SDK

ATTRIBUTE DESCRIPTION
workspace_client

Databricks SDK WorkspaceClient built from this provider's credentials.

TYPE: 'WorkspaceClient'

workspace_client property ¤

Databricks SDK WorkspaceClient built from this provider's credentials.

workspace_client_kwargs() ¤

Return kwargs dict suitable for instantiating a Databricks SDK WorkspaceClient. Only fields that are explicitly set are included.

Source code in laktory/models/resources/providers/databricksprovider.py
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
def workspace_client_kwargs(self) -> dict[str, Any]:
    """
    Return kwargs dict suitable for instantiating a Databricks SDK
    ``WorkspaceClient``. Only fields that are explicitly set are included.
    """
    keys = (
        "host",
        "account_id",
        "auth_type",
        "azure_client_id",
        "azure_client_secret",
        "azure_environment",
        "azure_tenant_id",
        "azure_workspace_resource_id",
        "client_id",
        "client_secret",
        "cluster_id",
        "config_file",
        "debug_headers",
        "debug_truncate_bytes",
        "google_credentials",
        "google_service_account",
        "password",
        "profile",
        "token",
        "username",
    )
    return {k: v for k in keys if (v := getattr(self, k, None)) is not None}