java.lang.Object
org.odpi.openmetadata.adapters.connectors.datastore.parquetfile.properties.ParquetFileMetadata

public class ParquetFileMetadata extends Object
ParquetFileMetadata describes the contents of a Parquet file using the information that the writer stored in the file's footer.
  • Field Details

    • CONVERTED_TYPE_ANNOTATIONS

      public static final String 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

      public static final String LOGICAL_TYPE_ANNOTATIONS
      The file uses the logical type annotations that were introduced in version 2 of the format.
      See Also:
    • NO_ANNOTATIONS

      public static final String 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
    • getFooterLength

      public int getFooterLength()
      Return the size of the footer.
      Returns:
      number of bytes
    • setFooterLength

      public void setFooterLength(int footerLength)
      Set up the size of the footer.
      Parameters:
      footerLength - 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

      public String getCreatedBy()
      Return the description of the software that wrote the file.
      Returns:
      string or null
    • setCreatedBy

      public void setCreatedBy(String createdBy)
      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

      public String 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

      public void setEncryptionAlgorithm(String encryptionAlgorithm)
      Set up the name of the algorithm used to encrypt columns in the file.
      Parameters:
      encryptionAlgorithm - string or null
    • getRootSchemaElement

      public ParquetSchemaElement getRootSchemaElement()
      Return the root of the schema. This is a group that contains the top-level columns.
      Returns:
      schema element
    • setRootSchemaElement

      public void setRootSchemaElement(ParquetSchemaElement rootSchemaElement)
      Set up the root of the schema.
      Parameters:
      rootSchemaElement - schema element
    • getKeyValueMetadata

      public Map<String,String> 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

      public List<ParquetRowGroup> getRowGroups()
      Return the description of each row group.
      Returns:
      list
    • getColumnProfiles

      public List<ParquetColumnProfile> 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

      public List<ParquetSchemaElement> getColumns()
      Return the top-level columns. A column may be a group if the file contains nested data.
      Returns:
      list
    • getColumnNames

      public List<String> 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

      public List<String> getCompressionCodecs()
      Return the names of the compression algorithms used in the file.
      Returns:
      list
    • getEncodings

      public List<String> getEncodings()
      Return the names of the encodings used in the file.
      Returns:
      list
    • getDataPageVersions

      public List<String> getDataPageVersions()
      Return the versions of the data page layout (V1 and/or V2) used in the file.
      Returns:
      list
    • getTypeAnnotationStyle

      public String getTypeAnnotationStyle()
      Return which style of annotation the writer used to describe how the stored values are to be interpreted.
      Returns:
      LogicalType, ConvertedType or None