Skip to content

yggdrasil.databricks.resource

resource

Base class for every Databricks resource wrapper.

Split out of :mod:yggdrasil.databricks.client so resource modules can import :class:DatabricksResource without pulling the whole client module's transitive surface.

DatabricksResource

DatabricksResource(service=None, *args, **kwargs)

Bases: ExploreUrlRepr, ABC

explore_url property

explore_url: Optional[URL]

Workspace UI deep-link for this resource, or None.

Concrete resources (:class:Catalog, :class:Schema, :class:Volume, :class:Table, :class:SQLWarehouse, :class:Job, :class:VolumePath, …) override this to return the /explore/data/... / /sql/warehouses/... / /jobs/... URL that opens the resource in the workspace UI. The inherited :class:ExploreUrlRepr keys off the override — anything that returns a non-None URL gets a ClassName(<url>) repr (and a clickable _repr_html_) for free without restating it on every subclass.

sql property

sql: 'SQLEngine'

Shorthand for self.service.client.sql — the active :class:SQLEngine.