yggdrasil.databricks.securable¶
securable ¶
Dict-like base for Unity Catalog securable collection services.
:class:SecurableMapping makes a :class:DatabricksService over a named
securable collection (credentials, external locations, …) a
:class:~collections.abc.MutableMapping::
svc[name] # fetch the resource (KeyError if absent)
svc[name] = spec # create it (or update if it exists)
del svc[name] # delete it
name in svc # exists?
list(svc) / len(svc) # the securable names
svc.get(name) / svc.pop(name) / svc.keys() / .values() / .items()
So the full mapping mixin (get / pop / keys / values /
items / setdefault / …) comes for free. clear() is refused — a
bulk wipe of a metastore collection is never what you meant.
A subclass implements six hooks: :meth:resolve (flexible coercion → a lazy
handle), :meth:_infos (SDK info iterator), :meth:get_info, :meth:_resource
(handle factory), :meth:delete, and :meth:_apply (create-or-update).
SecurableMapping ¶
Bases: DatabricksService, MutableMapping
environments
property
¶
Base-environment service (shorthand for client.environments).
tables
property
¶
Collection-level Unity Catalog table service (shorthand for client.tables).
views
property
¶
Alias for :attr:tables — :class:Table covers both managed/external
tables and view-shaped securables.
catalogs
property
¶
Collection-level Unity Catalog hierarchy service (shorthand for client.catalogs).
schemas
property
¶
Collection-level Unity Catalog schema service (shorthand for client.schemas).
volumes
property
¶
Collection-level Unity Catalog volume service (shorthand for client.volumes).
resolve
abstractmethod
¶
Coerce (resource | name | id | kwargs) to a lazy resource
handle (no fetch for the plain-name case).
get_info
abstractmethod
¶
Fetch one securable's SDK info (raises :class:NotFound).
default_tags ¶
Return default resource tags for Databricks assets.
Returns:
| Type | Description |
|---|---|
dict[str, str]
|
A dict of default tags. |