OpenMS
Loading...
Searching...
No Matches
OpenMS::ArrowIOHelpers Namespace Reference

Public helpers for writing and concatenating Arrow tables to Parquet files. More...

Functions

String generateUuidV4 ()
 Generate a lowercase hyphenated RFC 4122 version-4 UUID string.
 
bool writeTableToParquet (const std::shared_ptr< arrow::Table > &table, const String &filename, const ParquetWriteConfig &config=ParquetWriteConfig{})
 Write an Arrow table to a Parquet file.
 
bool concatenateAndWriteToParquet (const std::vector< std::shared_ptr< arrow::Table > > &tables, const String &filename, const ParquetWriteConfig &config=ParquetWriteConfig{})
 Concatenate a vector of Arrow tables and write the result to a Parquet file.
 

Detailed Description

Public helpers for writing and concatenating Arrow tables to Parquet files.

TOPP tools link against libOpenMS (which exports these helpers) but not directly against Arrow/Parquet. These wrappers keep all Arrow/Parquet API calls inside libOpenMS so downstream binaries don't need to import Arrow symbols.

Function Documentation

◆ concatenateAndWriteToParquet()

bool concatenateAndWriteToParquet ( const std::vector< std::shared_ptr< arrow::Table > > &  tables,
const String filename,
const ParquetWriteConfig config = ParquetWriteConfig{} 
)

Concatenate a vector of Arrow tables and write the result to a Parquet file.

All tables must share the same schema. An empty input vector is a no-op (returns true without writing).

Parameters
[in]tablesVector of Arrow tables to concatenate (must share schema)
[in]filenameOutput file path
[in]configParquet writer configuration
Returns
true on success (or if tables is empty), false on error

◆ generateUuidV4()

String generateUuidV4 ( )

Generate a lowercase hyphenated RFC 4122 version-4 UUID string.

Used by QPX Parquet exporters when attaching file metadata.

Returns
UUID string, e.g. "550e8400-e29b-41d4-a716-446655440000"

◆ writeTableToParquet()

bool writeTableToParquet ( const std::shared_ptr< arrow::Table > &  table,
const String filename,
const ParquetWriteConfig config = ParquetWriteConfig{} 
)

Write an Arrow table to a Parquet file.

Parameters
[in]tableThe Arrow table to write (must not be null)
[in]filenameOutput file path
[in]configParquet writer configuration (compression, row group size, ...)
Returns
true on success, false on error (errors are logged)