Class ParquetUtil
java.lang.Object
com.northconcepts.datapipeline.parquet.ParquetUtil
Utility methods to read Parquet schemas and to rewrite schema fields identified by column path.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringmakeOptionalFieldsRequired(List<ColumnPath> columnPaths, MessageType schema) Returns the schema as text with the given columns changed from optional to required.static StringmakeRequiredFieldsOptional(List<ColumnPath> columnPaths, MessageType schema) Returns the schema as text with the given columns changed from required to optional.static MessageTypereadSchema(File file) Parses the Parquet message type schema stored as text in the file, read with the platform default charset.static MessageTypereadSchema(Reader reader) Parses the reader's full text as a Parquet message type schema; the reader is closed afterwards.static StringremoveSchemaFields(List<ColumnPath> columnPaths, MessageType schema) Returns the schema as text with the declarations of the given columns removed.
-
Constructor Details
-
ParquetUtil
public ParquetUtil()
-
-
Method Details
-
readSchema
Parses the reader's full text as a Parquet message type schema; the reader is closed afterwards.- Throws:
IOException
-
readSchema
Parses the Parquet message type schema stored as text in the file, read with the platform default charset.- Throws:
IOException
-
makeRequiredFieldsOptional
Returns the schema as text with the given columns changed from required to optional. -
makeOptionalFieldsRequired
Returns the schema as text with the given columns changed from optional to required. -
removeSchemaFields
Returns the schema as text with the declarations of the given columns removed.
-