bauplan.state
The execution context for a run, capturing the parameters that were used to launch it.
The state of a completed (or failed) run, including logs, timing, and per-task lifecycle events.
The result of a plan_table_creation call.
The plan field contains the schema plan as a YAML string. You can modify
it before applying, for example to add partitioning:
import bauplan
import yaml
client = bauplan.Client()
plan_state = client.plan_table_creation('my_table', 's3://bucket/path/*.parquet')
plan = yaml.safe_load(plan_state.plan)
plan['schema_info']['partitions'] = [
{
'from_column_name': 'datetime_column',
'transform': {'name': 'year'},
}
]
modified_plan = yaml.dump(plan)