bauplan.state
The parameters that were passed to an external table creation job.
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 state of a completed Client.apply_table_creation_plan job, which
materializes a previously produced bauplan.state.TableCreatePlanState plan.
The result of a Client.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)