parquet::schema

Module printer

Source
Expand description

Parquet schema printer. Provides methods to print Parquet file schema and list file metadata.

ยงExample

use parquet::{
    file::reader::{FileReader, SerializedFileReader},
    schema::printer::{print_file_metadata, print_parquet_metadata, print_schema},
};
use std::{fs::File, path::Path};

// Open a file
let path = Path::new("test.parquet");
if let Ok(file) = File::open(&path) {
    let reader = SerializedFileReader::new(file).unwrap();
    let parquet_metadata = reader.metadata();

    print_parquet_metadata(&mut std::io::stdout(), &parquet_metadata);
    print_file_metadata(&mut std::io::stdout(), &parquet_metadata.file_metadata());

    print_schema(
        &mut std::io::stdout(),
        &parquet_metadata.file_metadata().schema(),
    );
}

Structsยง

  • Printer ๐Ÿ”’
    Struct for printing Parquet message type.

Constantsยง

Functionsยง