atoti.Session.read_parquet()#
- Session.read_parquet(path, /, *, client_side_encryption=None, columns={}, data_types={}, default_values={}, keys=frozenset({}), partitioning=None, table_name=None, **kwargs)#
Read a Parquet file into a table.
Note
This is just a shortcut for:
parquet_load = tt.ParquetLoad(path, ...) inferred_data_types = session.tables.infer_data_types(parquet_load) table = session.create_table( table_name, data_types={**inferred_data_types, **data_types}, default_values=..., keys=..., partitioning=..., ) table.load(parquet_load)
The longer version unlocks better performance because it can be split to move the
load()
call inside adata_transaction()
.- Parameters:
client_side_encryption (ClientSideEncryptionConfig | None) – See
atoti.ParquetLoad.client_side_encryption
.columns (Mapping[str, str]) – See
atoti.ParquetLoad.columns
.data_types (Mapping[str, DataType]) – See
create_table()
’s data_types.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.path (Path | str) – See
atoti.ParquetLoad.path
.table_name (str | None) – See
create_table()
’s name.kwargs (Unpack[_ReadParquetPrivateParameters])
- Return type: