ParquetTableWriter#

public final class ParquetTableWriter extends TableWriter#

A chunked Parquet writer that can return its footer metadata when closed.

Method Summary

close()

closeAndGetFooter()

Finish writing and return the Parquet footer metadata.

write(Table table)

Write out a table.

Fields inherited from class ai.rapids.cudf.TableWriter: writerHandle

Methods inherited from class ai.rapids.cudf.TableWriter: getWriteStatistics

Methods

public void write(Table table)#

Write out a table.

Note that all columns must be in the same order each time this is called and the format of each table cannot change.

Parameters:

table – what to write out.

public void close() throws CudfException#
public HostMemoryBuffer closeAndGetFooter() throws CudfException#

Finish writing and return the Parquet footer metadata.

The returned buffer is a metadata-only Parquet file containing the leading PAR1 magic, the serialized file metadata, the footer length, and the trailing PAR1 magic. The caller must close the returned buffer.

This is a complete metadata-only Parquet file rather than raw footer bytes. Callers can pass it to a Parquet reader to obtain row-group metadata, offsets, and column metrics without rereading the output file. libcudf creates the buffer from the writer’s in-memory metadata during successful finalization; the downstream Parquet reader is responsible for validating the serialized metadata it consumes.

Throws:
Returns:

an owned host buffer containing the Parquet footer metadata