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ยง
- INDENT_
WIDTH ๐
Functionsยง
- print_
dashes ๐ - Prints file metadata
FileMetaData
information. - Prints Parquet metadata
ParquetMetaData
information. - Prints Parquet
Type
information. - print_
timeunit ๐