Skip to main content

bauplan.state


classApplyPlanState

ApplyPlanState tracks information about what happened during the course of an "apply import plan" job that executes the plan to import a table from cloud storage to your Bauplan data catalog.

It represents the state of the job, including job ID, job status (failure/success), error description (if any), and a list of events describing each step of the job.


classCommonRunState

CommonRunState tracks information about what happened during the course of a Bauplan job run.

Attributes

user_logs(

List[str]

)
A list of user log messages.
runner_events(

List[RunnerEvent]

)
A list of runner events.
runtime_logs(

List[RuntimeLogEvent]

)
A list of runtime log events.
tasks_started(

Dict[str, datetime.datetime]

)
A dictionary mapping task IDs to their start times.
tasks_stopped(

Dict[str, datetime.datetime]

)
A dictionary mapping task IDs to their stop times.
job_status(

Optional[str]

)
The status of the job (e.g., "success", "failure").
started_at_ns(

int

)
The start time of the job in nanoseconds since the epoch.
ended_at_ns(

Optional[int]

)
The end time of the job in nanoseconds since the epoch.

classExternalTableCreateContext

bauplan.state.ExternalTableCreateContext(
*,
branch_name: str,
table_name: str,
namespace: str,
input_files: Optional[List[str]],
overwrite: bool,
debug: bool,
detach: bool
)-> None

classExternalTableCreateState

ExternalTableCreateState tracks information about what happened during the course of an "external table create" job that creates an external table based on S3 files or Iceberg metadata in your Bauplan data catalog.

It represents the state of the job, including job ID, job status (failure/success), error description (if any), and a list of events describing each step of the job.


classPlanImportState

PlanImportState tracks information about what happened during the course of an "plan import" job that plans a job to import a table from cloud storage to your Bauplan data catalog.

It represents the state of the job, including job ID, job status (failure/success), error description (if any), and a list of events describing each step of the job.

It also includes the output of the job: a string containing the YAML of the import plan.


classReRunExecutionContext

bauplan.state.ReRunExecutionContext(
*,
re_run_job_id: str,
ref: str,
namespace: str,
dry_run: bool,
transaction: str,
strict: str,
cache: str,
preview: str,
debug: bool
)-> None

ReRunExecutionContext tracks information about the context in which a Bauplan job rerun is executed.

Attributes

re_run_job_id(

str

)
The ID of the rerun job.
ref(

str

)
The ref, branch name or tag name which to used for rerun.
namespace(

str

)
The namespace in which the rerun is executed.
dry_run(

bool

)
Whether the rerun is a dry run.
transaction(

str

)
Whether to enable or disable transaction mode for the run (e.g., "on" or "off").
strict(

str

)
Whether to enable or disable strict schema validation (e.g., "on" or "off").
cache(

str

)
Whether to enable or disable caching for the run. (e.g., "on" or "off").
preview(

str

)
Whether there is a preview mode for the rerun ('on'/'off'/'head'/'tail').
debug(

bool

)
Whether debug mode is enabled for the rerun.

classReRunState

ReRunState tracks information about what happened during the course of a Bauplan job rerun (executed DAG).

It represents the state of a run, including job ID, task lifecycle events, user logs, task start and stop times, failed nonfatal task descriptions, job status, and failed fatal task description.

Attributes

job_id(

str

)
The ID of the job.
run_id(

str

)
The ID of the run.
The execution context of the rerun.

classRunExecutionContext

bauplan.state.RunExecutionContext(
*,
snapshot_id: str,
snapshot_uri: str,
project_dir: str,
ref: str,
namespace: str,
dry_run: bool,
transaction: str,
strict: str,
cache: str,
preview: str,
debug: bool,
detach: bool
)-> None

classRunState

RunState tracks information about what happened during the course of a Bauplan job run (executed DAG).

It represents the state of a run, including job ID, task lifecycle events, user logs, task start and stop times, failed nonfatal task descriptions, project directory, job status, and failed fatal task description.

Attributes

job_id(

str

)
The ID of the job.
The execution context of the run.

classTableCreatePlanApplyContext

bauplan.state.TableCreatePlanApplyContext(
*,
debug: bool
)-> None

classTableCreatePlanApplyState

TableCreatePlanApplyState tracks information about what happened during the course of an "table create" job that plans a job to create an empty table based on your cloud storage to your Bauplan data catalog.

It represents the state of the job, including job ID, job status (failure/success), error description (if any), and a list of events describing each step of the job.

It also includes the output of the job: a string containing the YAML of the import plan.


classTableCreatePlanContext

bauplan.state.TableCreatePlanContext(
*,
branch_name: str,
table_name: str,
table_replace: bool,
table_partitioned_by: Optional[str],
namespace: str,
search_string: str,
debug: bool
)-> None

classTableCreatePlanState

TableCreatePlanState tracks information about what happened during the course of an "table create" job that plans a job to create an empty table based on your cloud storage to your Bauplan data catalog.

It represents the state of the job, including job ID, job status (failure/success), error description (if any), and a list of events describing each step of the job.

It also includes the output of the job: a string containing the YAML of the import plan.


classTableDataImportContext

bauplan.state.TableDataImportContext(
*,
branch_name: str,
table_name: str,
namespace: str,
search_string: str,
import_duplicate_files: bool,
best_effort: bool,
continue_on_error: bool,
transformation_query: Optional[str],
preview: str,
debug: bool,
detach: bool
)-> None

classTableDataImportState

TableDataImportState tracks information about what happened during the course of an "table create" job that plans a job to create an empty table based on your cloud storage to your Bauplan data catalog.

It represents the state of the job, including job ID, job status (failure/success), error description (if any), and a list of events describing each step of the job.

It also includes the output of the job: a string containing the YAML of the import plan.

Attributes

job_id(

str

)
The ID of the job.
The execution context of the table data import.
error(

Optional[str]

)
An optional error message if the job failed.
job_status(

Optional[str]

)
The status of the job (e.g., "SUCCESS", "FAILED").
runner_events(

Optional[List[RunnerEvent]]

)
A list of runner events associated with the job.