atoti.Session.read_arrow()#
- Session.read_arrow(arrow_table, /, *, data_types={}, default_values={}, keys=frozenset({}), partitioning=None, table_name, **kwargs)#
Read an Arrow table into an Atoti table.
Note
This is just a shortcut for:
inferred_data_types = session.tables.infer_data_types(arrow_table) table = session.create_table( table_name, data_types={**inferred_data_types, **data_types}, default_values=..., keys=..., partitioning=..., ) table.load(arrow_table)
The longer version unlocks better performance because it can be split to move the
load()
call inside adata_transaction()
.- Parameters:
arrow_table (Table) – The Arrow Table to load.
data_types (Mapping[str, DataType]) – Data types for some or all columns of the table. Data types for non specified columns will be inferred from the dataframe dtypes.
default_values (Mapping[str, bool | int | float | date | datetime | time | Sequence[bool] | Sequence[int] | Sequence[float] | Sequence[str] | str | None]) – See
create_table()
’s default_values.keys (Set[str] | Sequence[str]) – See
create_table()
’s keys.partitioning (str | None) – See
create_table()
’s partitioning.table_name (str) – See
create_table()
’s name.kwargs (Unpack[_ReadArrowPrivateParameters])
- Return type: