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(),
);
}
Functions§
- Prints file metadata
FileMetaData
information. - Prints Parquet metadata
ParquetMetaData
information. - Prints Parquet
Type
information.