Package io.deephaven.parquet.table
Class ParquetSchemaReader
java.lang.Object
io.deephaven.parquet.table.ParquetSchemaReader
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic final class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparseMetadata(@NotNull Map<String, String> keyValueMetadata) static ParquetInstructionsreadParquetSchema(@NotNull String filePath, @NotNull ParquetInstructions readInstructions, @NotNull ParquetSchemaReader.ColumnDefinitionConsumer consumer, @NotNull BiFunction<String, Set<String>, String> legalizeColumnNameFunc) Obtain schema information from a parquet filestatic ParquetInstructionsreadParquetSchema(@NotNull org.apache.parquet.schema.MessageType schema, @NotNull Map<String, String> keyValueMetadata, @NotNull ParquetInstructions readInstructions, @NotNull ParquetSchemaReader.ColumnDefinitionConsumer consumer, @NotNull BiFunction<String, Set<String>, String> legalizeColumnNameFunc) Obtain schema information from a parquet file
-
Constructor Details
-
ParquetSchemaReader
public ParquetSchemaReader()
-
-
Method Details
-
readParquetSchema
public static ParquetInstructions readParquetSchema(@NotNull @NotNull String filePath, @NotNull @NotNull ParquetInstructions readInstructions, @NotNull @NotNull ParquetSchemaReader.ColumnDefinitionConsumer consumer, @NotNull @NotNull BiFunction<String, Set<String>, throws IOExceptionString> legalizeColumnNameFunc) Obtain schema information from a parquet file- Parameters:
filePath- Location for input parquet filereadInstructions- Parquet read instructions specifying transformations like column mappings and codecs. Note a new read instructions based on this one may be returned by this method to provide necessary transformations, eg, replacing unsupported characters like ' ' (space) in column names.consumer- A ColumnDefinitionConsumer whose accept method would be called for each column in the file- Returns:
- Parquet read instructions, either the ones supplied or a new object based on the supplied with necessary transformations added.
- Throws:
IOException
-
parseMetadata
-
readParquetSchema
public static ParquetInstructions readParquetSchema(@NotNull @NotNull org.apache.parquet.schema.MessageType schema, @NotNull @NotNull Map<String, String> keyValueMetadata, @NotNull @NotNull ParquetInstructions readInstructions, @NotNull @NotNull ParquetSchemaReader.ColumnDefinitionConsumer consumer, @NotNull @NotNull BiFunction<String, Set<String>, String> legalizeColumnNameFunc) Obtain schema information from a parquet file- Parameters:
schema- Parquet schema. DO NOT RELY ONParquetMetadataConverterFOR THIS! USEParquetFileReader!keyValueMetadata- Parquet key-value metadata mapreadInstructions- Parquet read instructions specifying transformations like column mappings and codecs. Note a new read instructions based on this one may be returned by this method to provide necessary transformations, eg, replacing unsupported characters like ' ' (space) in column names.consumer- A ColumnDefinitionConsumer whose accept method would be called for each column in the file- Returns:
- Parquet read instructions, either the ones supplied or a new object based on the supplied with necessary transformations added.
-