Skip to main content

bauplan.schema


classActorNon-instantiable

An actor (author or committer) in a commit.

Attributes

email:

str | None

The actor's email address.

name:

str

The actor's name.


classBranchNon-instantiable

A data branch, used to isolate data changes before merging into main.

Bases:

Ref


classCommitNon-instantiable

A commit in the catalog.

Attributes

author:

Actor | None

The first author of the commit.

authored_date:

datetime

The date the commit was authored.

authors:

list[Actor]

The authors of the commit.

body:

str | None

The body of the commit message. None if the message has no body.

committed_date:

datetime

The date the commit was committed.

committer:

Actor

The committer of the commit.

message:

str | None

The commit message.

parent_hashes:

list[str]

The parent commit hashes.

parent_merge_ref:

Branch | None

For merge commits, the branch that was merged in (second parent). None for regular commits.

parent_ref:

Ref

The parent ref.

properties:

dict[str, str]

Custom properties on the commit.

ref:

Ref

The ref (branch, tag, or detached) this commit is on.

signed_off_by:

list[Actor]

Actors who signed off on the commit.

subject:

str | None

The subject line of the commit message.


classDAGEdgeNon-instantiable

A dependency between two DAGNode instances, representing dataflow.

Attributes

destination_model:

str

The destination model ID.

source_model:

str | None

The source model ID. None when the data source is a table scan rather than another model's output.


classDAGNodeNon-instantiable

A node in the job DAG (a model).

Attributes

id:

str

The unique identifier for this node (model).

name:

str

The model name.


classDetachedRefNon-instantiable

A ref not attached to a branch or tag, pointing directly to a commit hash.

Bases:

Ref


classJobNon-instantiable

The record of running a pipeline, query, or an import (see bauplan.schema.JobKind for all job kinds).

Attributes

created_at:

datetime | None

When the job was created.

finished_at:

datetime | None

When the job finished (successfully or not).

id:

str

The unique identifier for this job.

kind:

JobKind

The type of job (query, run, import, etc.).

runner:

str

The runner instance assigned to execute this job.

started_at:

datetime | None

When the job started executing.

status:

JobState

The job's current state.

human_readable_status:

str

A human-readable status string (e.g. "running", "complete").

user:

str

The user who submitted the job.


classJobContextNon-instantiable

The working context of a job, including its ref, DAG, code snapshot, and logs.

Attributes

dag_edges:

list[DAGEdge]

dag_nodes:

list[DAGNode]

id:

str

logs:

list[JobLogEvent]

project_id:

str | None

project_name:

str | None

ref:

str | None

snapshot_dict:

dict[str, str]

tx_ref:

str | None


classJobKindNon-instantiable

The kind/type of a job.

Attributes

IMPORT_PLAN_APPLY:

Final[JobKind]

IMPORT_PLAN_CREATE:

Final[JobKind]

QUERY:

Final[JobKind]

RUN:

Final[JobKind]

TABLE_IMPORT:

Final[JobKind]

TABLE_PLAN_CREATE:

Final[JobKind]

TABLE_PLAN_CREATE_APPLY:

Final[JobKind]

UNSPECIFIED:

Final[JobKind]


classJobLogEventNon-instantiable

A single log message from a job execution. When you output logs within a Python model, they are persisted as JobLogEvents.

Attributes

The log level (ERROR, WARN, DEBUG, INFO, TRACE).

message:

str

The log message.

The output stream (STDOUT, STDERR).


classJobLogLevelNon-instantiable

The severity level of a log event.

Attributes

DEBUG:

Final[JobLogLevel]

ERROR:

Final[JobLogLevel]

INFO:

Final[JobLogLevel]

TRACE:

Final[JobLogLevel]

WARN:

Final[JobLogLevel]


classJobLogStreamNon-instantiable

The output stream of a log event.

Attributes

STDERR:

Final[JobLogStream]

STDOUT:

Final[JobLogStream]


classJobStateNon-instantiable

The execution state of a job.

Attributes

ABORT:

Final[JobState]

COMPLETE:

Final[JobState]

FAIL:

Final[JobState]

NOT_STARTED:

Final[JobState]

OTHER:

Final[JobState]

RUNNING:

Final[JobState]

UNSPECIFIED:

Final[JobState]


classNamespaceNon-instantiable

A container for organizing tables.

Attributes

name:

str

The namespace name.


classPartitionFieldNon-instantiable

A partition field on a table.

Attributes

name:

str

The partition field name.

transform:

str

The partition transform (e.g. "day", "month", "identity").


classRefNon-instantiable

A reference to a branch, tag, or commit, as returned by API operations.

Attributes

hash:

str

The hash of the branch or tag.

name:

str

The name of the branch or tag.

type:

RefType

The type of the ref, either 'BRANCH', 'TAG', or 'DETACHED'.


classRefTypeNon-instantiable

The type of a ref.

Attributes

BRANCH:

Final[RefType]

DETACHED:

Final[RefType]

TAG:

Final[RefType]


classTableNon-instantiable

A table in the lake.

Attributes

fqn:

str

The fully qualified name: namespace.name.

current_schema_id:

int | None

The current Iceberg schema ID.

current_snapshot_id:

int | None

The current Iceberg snapshot ID.

fields:

list[TableField]

The fields in the table schema.

id:

UUID

The table ID.

The table type.

last_updated_at:

datetime

The timestamp when the table was last updated.

metadata_location:

str

The URI of the Iceberg metadata file.

name:

str

The table name.

namespace:

str

The table namespace.

partitions:

list[PartitionField]

The partition fields on the table.

properties:

dict[str, str]

Table properties.

records:

int | None

The number of records in the table.

size:

int | None

The size of the table.

snapshots:

int | None

The number of snapshots.

defis_managed (...)

Whether this is a managed table.

def is_managed() -> bool: ...

defis_external (...)

Whether this is an external table.

def is_external() -> bool: ...

classTableFieldNon-instantiable

A field in a table schema.

Attributes

id:

int

The field ID.

name:

str

The field name.

required:

bool

Whether the field is required.

type:

str

The field type.


classTableKindNon-instantiable

The kind of table entry.

Attributes

ExternalTable:

Final[TableKind]

An external table.

Table:

Final[TableKind]

A managed table.


classTagNon-instantiable

A human-readable name that points to a specific commit in the data lake. Tags are often used to mark important milestones in the data lake history, such as releases or experiments.

Bases:

Ref