Class ParquetFileMetadata
java.lang.Object
org.odpi.openmetadata.adapters.connectors.datastore.parquetfile.properties.ParquetFileMetadata
ParquetFileMetadata describes the contents of a Parquet file using the information that the writer stored
in the file's footer.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe file only uses the original (version 1) style of annotation to describe how values are interpreted.static final StringThe file uses the logical type annotations that were introduced in version 2 of the format.static final StringThe file's columns are described only by the type they are stored as. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the names of the top-level columns.Return the summary of the values in each of the leaf columns, in the order that they appear in the schema.Return the top-level columns.longReturn the number of bytes that the values occupy in the file.Return the names of the compression algorithms used in the file.Return the description of the software that wrote the file.Return the versions of the data page layout (V1 and/or V2) used in the file.Return the names of the encodings used in the file.Return the name of the algorithm used to encrypt columns in the file.longReturn the size of the file.intReturn the size of the footer.intReturn the version of the Parquet format that the writer declared in the footer.Return the additional properties that the writer added to the file.Return the root of the schema.longReturn the number of rows in the file.Return the description of each row group.Return which style of annotation the writer used to describe how the stored values are to be interpreted.longReturn the number of bytes that the values occupy once they are decompressed.voidsetCreatedBy(String createdBy) Set up the description of the software that wrote the file.voidsetEncryptionAlgorithm(String encryptionAlgorithm) Set up the name of the algorithm used to encrypt columns in the file.voidsetFileLength(long fileLength) Set up the size of the file.voidsetFooterLength(int footerLength) Set up the size of the footer.voidsetFormatVersion(int formatVersion) Set up the version of the Parquet format that the writer declared in the footer.voidsetRootSchemaElement(ParquetSchemaElement rootSchemaElement) Set up the root of the schema.voidsetRowCount(long rowCount) Set up the number of rows in the file.
-
Field Details
-
CONVERTED_TYPE_ANNOTATIONS
The file only uses the original (version 1) style of annotation to describe how values are interpreted.- See Also:
-
LOGICAL_TYPE_ANNOTATIONS
The file uses the logical type annotations that were introduced in version 2 of the format.- See Also:
-
NO_ANNOTATIONS
The file's columns are described only by the type they are stored as.- See Also:
-
-
Constructor Details
-
ParquetFileMetadata
public ParquetFileMetadata()Default constructor.
-
-
Method Details
-
getFileLength
public long getFileLength()Return the size of the file.- Returns:
- number of bytes
-
setFileLength
public void setFileLength(long fileLength) Set up the size of the file.- Parameters:
fileLength- number of bytes
-
getFormatVersion
public int getFormatVersion()Return the version of the Parquet format that the writer declared in the footer. This is 1 or 2. It is not a reliable guide to the features used in the file since many writers always set it to 1. See also getDataPageVersions(), getEncodings() and getTypeAnnotationStyle().- Returns:
- version number
-
setFormatVersion
public void setFormatVersion(int formatVersion) Set up the version of the Parquet format that the writer declared in the footer.- Parameters:
formatVersion- version number
-
getCreatedBy
Return the description of the software that wrote the file.- Returns:
- string or null
-
setCreatedBy
Set up the description of the software that wrote the file.- Parameters:
createdBy- string or null
-
getRowCount
public long getRowCount()Return the number of rows in the file.- Returns:
- count
-
setRowCount
public void setRowCount(long rowCount) Set up the number of rows in the file.- Parameters:
rowCount- count
-
getEncryptionAlgorithm
Return the name of the algorithm used to encrypt columns in the file.- Returns:
- string, or null if the file is not encrypted
-
setEncryptionAlgorithm
Set up the name of the algorithm used to encrypt columns in the file.- Parameters:
encryptionAlgorithm- string or null
-
getRootSchemaElement
Return the root of the schema. This is a group that contains the top-level columns.- Returns:
- schema element
-
setRootSchemaElement
Set up the root of the schema.- Parameters:
rootSchemaElement- schema element
-
getKeyValueMetadata
Return the additional properties that the writer added to the file. These often include the schema used by the writing technology (for example, Apache Spark, Apache Arrow or pandas).- Returns:
- map of property name to property value
-
getRowGroups
Return the description of each row group.- Returns:
- list
-
getColumnProfiles
Return the summary of the values in each of the leaf columns, in the order that they appear in the schema.- Returns:
- list
-
getColumns
Return the top-level columns. A column may be a group if the file contains nested data.- Returns:
- list
-
getColumnNames
Return the names of the top-level columns.- Returns:
- list
-
getCompressedSize
public long getCompressedSize()Return the number of bytes that the values occupy in the file.- Returns:
- number of bytes
-
getUncompressedSize
public long getUncompressedSize()Return the number of bytes that the values occupy once they are decompressed.- Returns:
- number of bytes
-
getCompressionCodecs
Return the names of the compression algorithms used in the file.- Returns:
- list
-
getEncodings
Return the names of the encodings used in the file.- Returns:
- list
-
getDataPageVersions
Return the versions of the data page layout (V1 and/or V2) used in the file.- Returns:
- list
-
getTypeAnnotationStyle
Return which style of annotation the writer used to describe how the stored values are to be interpreted.- Returns:
- LogicalType, ConvertedType or None
-