deferred_read_parquet

xorq.api.deferred_read_parquet(
    path,
    con=None,
    table_name=None,
    schema=None,
    normalize_method=normalize_read_path_md5sum,
    relocatable=False,
    **kwargs,
)

Create a deferred read operation for Parquet files that will execute only when needed.

This function creates a representation of a read operation that doesn’t immediately load data into memory. Instead, it registers the operation to be performed when the resulting expression is executed.

Parameters

Name Type Description Default
path str, Path, or list or tuple of str or Path The path to the Parquet file or directory to be read. required
con Backend The connection object representing the backend where the Parquet data will be read. None
table_name str The name to give to the resulting table in the backend. If not provided, a unique name will be generated automatically. None
normalize_method Callable The method that returns the values to be used in the hashing of the Read operation. Defaults to the MD5 of the file contents; normalize_read_path_stat keys on mtime, size and inode instead. A build relocates local reads by default and keys them on MD5 whatever this is set to; the choice survives a build only with relocate_reads=False and an explicit table_name. normalize_read_path_md5sum
relocatable bool When True, xorq build will copy the backing file into the build artifact and rewrite the path so the archive is self-contained. False
**kwargs dict Additional keyword arguments passed to the backend’s read_parquet method. {}

Returns

Name Type Description
Expr An expression representing the deferred read operation.