State.add_table#

State.add_table(name: str, content: DataFrame | Dataset, salient: Optional[bool] = None)#

Add a data table to this context, and potentially mark it for checkpointing.

The table added completely replaces any existing table of the same name. In part because checkpointing currently manages tables only in their entirety, there is no mechanism to incrementally update a table by adding data (columns and/or rows) in-place, although nothing prevents the user of this method from partially re-using data content from an existing table via a zero-copy transformation.

Parameters:
namestr

The name of the table being added to this state’s context.

contentpandas.DataFrame or xarray.Dataset

The new data content to write.

salientbool, optional

Explicitly mark this table as salient or not. Salient tables are marked to be checkpointed the next time a checkpoint operation happens. If not set explicitly tables are presumed to be salient unless they elsewhere defined as temporary tables.

See also

State.set