Skip to main content
atoti_parquet.ParquetLoad(
    path: Path | str,
    *,
    client_side_encryption: ClientSideEncryptionConfig | None = None,
    columns: Mapping[str, str] = frozendict({}),
)
The definition of an Apache Parquet file load. The load() outcome depends on the error_handling argument. For instance, the following Parquet file has a Count column stored as float64, but table expects int.
Parquet is strongly typed, so the type mismatch is caught up front and no rows load regardless of error_handling. This argument only controls whether an error or warning is raised and what is logged. See CsvLoad for an example where invalid rows are skipped individually.
  • "fail" raises an error and interrupts the load:
  • "warn" skips the incompatible data and raises a Python warning:
  • "log" skips the incompatible data and logs the errors:
  • "skip" skips the incompatible data without logging:
See also: The other DataLoad implementations.

Attributes

path

The path to the Parquet file. If a path pointing to a directory is provided, all of the files with the .parquet extension in the directory will be loaded into the same table and, as such, they are all expected to share the same schema. The path can also be a glob pattern (e.g. "path/to/directory/*.parquet").

client_side_encryption

ClientSideEncryptionConfig | None

columns

Mapping from file column names to table column names. When the mapping is not empty, columns of the file absent from the mapping keys will not be loaded. Other parameters accepting column names expect to be passed table column names (i.e. values of this mapping) and not file column names.