Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt

Use this file to discover all available pages before exploring further.

Session.read_parquet(path, /, *, client_side_encryption=None, columns=frozendict({}), data_types=frozendict({}), default_values=frozendict({}), keys=frozenset({}), partitioning=None, table_name=None, **kwargs)

Read a Parquet file into a table.
This method is deprecated since 0.9.12.
The alternative is:
>>> import pprint
>>> from atoti_parquet import ParquetLoad
>>> path = test_resources_path / "dates.parquet"
>>> parquet_load = ParquetLoad(path)
>>> data_types = session.tables.infer_data_types(parquet_load)
>>> table = session.create_table("Example", data_types=data_types)
>>> table.load(parquet_load)
>>> pprint.pp(
...     {column_name: table[column_name].data_type for column_name in table}
... )
{'ID': 'long',
 'Date': 'LocalDateTime',
 'Continent': 'String',
 'Country': 'String',
 'City': 'String',
 'Color': 'String',
 'Quantity': 'double',
 'Price': 'double'}
>>> table.row_count
10
This alternative can be refactored to move the load() call inside a data_transaction().