yggdrasil.databricks.loki.base¶
base ¶
Shared base for the per-service Databricks Loki skills.
Each Databricks service module (sql, table, volume, job, …)
ships its own loki.py defining the Loki skill(s) for that service — close
to the code they drive, for isolation. They all build on
:class:DatabricksServiceSkill here: it guards the workspace session, hands
the authenticated client over (agent.databricks — Loki as token provider),
carries a precise domain preprompt, and offers the two small helpers every
service skill needs (_names to summarize SDK objects, _tabular to take
a row set as a frame through the project's Tabular-convertible objects).
DatabricksServiceSkill ¶
Bases: LokiSkill
Base for the Databricks service skills — guards the session for all of them.
The shared preprompt below is the package-level guideline; each service
skill overrides :attr:preprompt with its own precise guidance so a model
reasoning in that service's context reaches for the right dbc accessor.
names ¶
Summarize an iterable of SDK/resource objects to their identifying field.
tabular ¶
Take a row set as a polars frame via the object's own conversion.
A Databricks statement result, a Genie answer, an :class:IO leaf — they
are all Tabular-convertible, so we don't reshape data by hand: ask the
object for the representation we want (to_polars preferred, then pandas,
then records). Returns the object unchanged when it isn't tabular.