22.7. Metadata Tables #
- 22.7.1.
axe_snapshot- 22.7.2.
axe_snapshot_changes- 22.7.3.
axe_storage- 22.7.4.
axe_folder- 22.7.5.
axe_schema- 22.7.6.
axe_table- 22.7.7.
axe_tag- 22.7.8.
axe_data_file- 22.7.9.
axe_file_column_stats- 22.7.10.
axe_delete_file- 22.7.11.
axe_column- 22.7.12.
axe_table_stats- 22.7.13.
axe_table_column_stats- 22.7.14.
axe_partition_info- 22.7.15.
axe_partition_column- 22.7.16.
axe_file_partition_value- 22.7.17.
axe_files_scheduled_for_deletion- 22.7.18. Examples of Snapshot Usage
- 22.7.2.
This section describes metadata tables.
22.7.1. axe_snapshot #
This metadata table contains information about snapshots.
Column Name | Data Type | Constraint | Description |
|---|---|---|---|
|
| Primary key | The snapshot ID. It is referenced by most metadata tables. The value increases by 1 for each created snapshot |
|
|
| The snapshot creation date and time |
|
|
| The metadata catalog version. The value increases by 1 each time the catalog metadata changes, for example, when a new analytical table is created. This allows caching the catalog metadata |
|
|
| The ID assigned to the next metadata catalog object. The value increases by 1 each time a catalog object is created, for example, when a new analytical table is created |
|
|
| The ID assigned to the next Parquet or delete file. The value increases by 1 each time a Parquet or delete file is created. For more information about delete files, refer to Section 22.7.10 |
22.7.2. axe_snapshot_changes #
This metadata table contains information about snapshot changes. You can use it to resolve conflicts between different snapshots.
Column Name | Data Type | Constraint | Description |
|---|---|---|---|
|
| Primary key, foreign key | The ID of the snapshot, from the |
|
| - | A comma-separated list of snapshot changes in the following formats:
|
|
| - | The user associated with the snapshot changes |
|
| - | The message associated with the snapshot changes |
|
| - | Additional information associated with the snapshot changes |
22.7.3. axe_storage #
This metadata table contains information about storages.
Column Name | Data Type | Constraint | Description |
|---|---|---|---|
|
| Primary key | The storage ID assigned by increasing the |
|
|
| The persistent storage ID stored for compatibility with heap tables |
|
| Foreign key, | The ID of the snapshot associated with creating the storage, from the |
|
| Foreign key | The ID of the snapshot associated with deleting the storage, from the If the value is |
|
|
| The storage name (e.g., The This allows you to create a new storage with the same name as a previously deleted storage |
|
|
| The URI of the root storage directory Local storages have simple URIs (e.g., S3 storages have URIs with more complicated structures and parsing (e.g., |
|
|
| The storage type. Local, NFS, and S3 storages are currently supported |
22.7.4. axe_folder #
This metadata table contains information about shared directories.
Column Name | Data Type | Constraint | Description |
|---|---|---|---|
|
| Primary key | The shared directory ID assigned by increasing the |
|
|
| The persistent shared directory ID stored for compatibility with heap tables |
|
| Foreign key, | The ID of the snapshot associated with creating the shared directory, from the |
|
| Foreign key | The ID of the snapshot associated with deleting the shared directory, from the If the value is |
|
| Foreign key, | The ID of the storage that contains the shared directory, from the |
|
|
| The shared directory name (e.g., The This allows you to create a new shared directory with the same name as a previously deleted directory |
|
|
| The path to the shared directory relative to the root storage directory. The absolute path is generated by concatenating the |
22.7.5. axe_schema #
This metadata table contains information about schemas that contain analytical tables.
Column Name | Data Type | Constraint | Description |
|---|---|---|---|
|
| Primary key | The schema ID assigned by increasing the |
|
|
| The persistent schema ID stored for compatibility with heap tables |
|
| Foreign key, | The ID of the snapshot associated with creating the schema, from the |
|
| Foreign key | The ID of the snapshot associated with deleting the schema, from the If the value is |
|
|
| The schema name (e.g., The This allows you to create a new schema with the same name as a previously deleted schema |
|
|
| The path to the schema directory relative to the root storage directory |
|
|
| Specifies whether the path to the schema directory is relative to the root storage directory or absolute. Default value: |
|
| Foreign key, | The ID of the storage that contains the schema, from the |
22.7.6. axe_table #
This metadata table contains information about analytical tables.
Column Name | Data Type | Constraint | Description |
|---|---|---|---|
|
| Primary key | The analytical table ID assigned by increasing the |
|
|
| The persistent analytical table ID stored for compatibility with heap tables |
|
| Foreign key, | The ID of the snapshot associated with creating the analytical table, from the |
|
| Foreign key | The ID of the snapshot associated with deleting the analytical table, from the If the value is |
|
| Foreign key, | The ID of the schema that contains the analytical table, from the |
|
|
| The analytical table name (e.g., The This allows you to create a new analytical table with the same name as a previously deleted table |
|
|
| The path to the storage directory with Parquet files of the analytical table relative to the The absolute path is generated by concatenating the |
|
|
| Specifies whether the path to the storage directory with Parquet files of the analytical table is relative to the root storage directory or absolute. Default value: |
|
| Foreign key, | The ID of the storage that contains the analytical table, from the |
22.7.7. axe_tag #
This metadata table contains tags of metadata catalog objects.
Column Name | Data Type | Constraint | Description |
|---|---|---|---|
|
| Primary key | The ID of the metadata catalog object the tag is assigned to |
|
| Foreign key, | The ID of the snapshot associated with creating the tag, from the |
|
| Foreign key | The ID of the snapshot associated with deleting the tag, from the If the value is |
|
|
| The tag key |
|
|
| The tag value |
22.7.8. axe_data_file #
This metadata table contains information about Parquet files.
Column Name | Data Type | Constraint | Description |
|---|---|---|---|
|
| Primary key | The Parquet file ID assigned by increasing the |
|
| Foreign key, | The ID of the snapshot associated with creating the Parquet file when adding Parquet files to an analytical table or copying data from heap tables to an analytical table, from the |
|
| Foreign key | The ID of the snapshot associated with marking snapshots as expired, from the If the value is |
|
| Foreign key, | The ID of the analytical table that contains the Parquet file, from the |
|
|
| The order of the Parquet file in the analytical table. The |
|
|
| The path to the Parquet file (e.g., |
|
|
| Specifies whether the path to the Parquet file is relative to the path to the analytical table or absolute. Default value: |
|
|
| The file format. Currently, only the Parquet format is supported |
|
|
| The number of rows in the Parquet file |
|
|
| The Parquet file size, in bytes |
|
| - | The Parquet file footer size, in bytes |
|
|
| The It indicates the starting position of the file within the analytical table |
|
| - | The ID of the partition that contains the Parquet file, from the |
|
| - | The encryption key of the Parquet file, if encryption is enabled. You can enable encryption using the |
|
| - | The ID of the mapping used to map Parquet fields to analytical table columns without field IDs |
|
| - | The maximum snapshot ID in a partial Parquet file. Partial Parquet files contain rows inserted by multiple snapshots. For Parquet files that are not partial, the value is |
|
|
| The checksum of the Parquet file header, computed with the |
|
|
| The checksum of the Parquet file, computed with the You can use this checksum to check the Parquet file for corruption. For more information, refer to Section 19.4 |
22.7.9. axe_file_column_stats #
This metadata table contains column statistics for each Parquet file of an analytical table.
Column Name | Data Type | Constraint | Description |
|---|---|---|---|
|
| Primary key, foreign key | The ID of the Parquet file that contains the column, from the |
|
| Primary key, foreign key | The ID of the analytical table that contains the column, from the |
|
| Primary key, foreign key | The ID of the column for which statistics are collected, from the |
|
|
| The column size, in bytes |
|
|
| The number of values in the column. This is not the same as the number of rows since the column can contain nested types, such as structures and lists |
|
|
| The number of |
|
| - | The minimum column value |
|
| - | The maximum column value |
|
| - | Specifies whether the column can contain This is relevant only for |
22.7.10. axe_delete_file #
This metadata table contains information about delete files — Parquet files that store the positions of rows deleted from analytical tables.
Column Name | Data Type | Constraint | Description |
|---|---|---|---|
|
| Primary key | The delete file ID assigned by increasing the |
|
| Foreign key, | The ID of the analytical table whose rows are deleted, from the |
|
| Foreign key, | The ID of the snapshot associated with deleting rows from the Parquet file, from the |
|
| Foreign key | The ID of the snapshot associated with removing the delete file, from the If the value is |
|
| Foreign key, | The ID of the Parquet file whose rows are deleted, from the |
|
|
| The path to the delete file (e.g., |
|
|
| Specifies whether the path to the delete file is relative to the path to the analytical table or absolute. Default value: |
|
|
| The delete file format. Currently, only the Parquet format is supported |
|
|
| The number of rows in the delete file |
|
|
| The delete file size, in bytes |
|
| - | The delete file footer size, in bytes |
|
| - | The encryption key of the delete file, if encryption is enabled. You can enable encryption using the |
|
| - | The maximum snapshot ID in a partial delete file. Partial delete files contain rows deleted by multiple snapshots. For delete files that are not partial, the value is |
22.7.11. axe_column #
This metadata table contains information about analytical table columns.
Column Name | Data Type | Constraint | Description |
|---|---|---|---|
|
| Primary key | The column ID. If the initial Parquet file contains the The |
|
| Foreign key, | The ID of the snapshot associated with creating the column, from the |
|
| Foreign key | The ID of the snapshot associated with deleting the column, from the If the value is |
|
| Foreign key, | The ID of the analytical table that contains the column, from the |
|
|
| The sequence number of the column. The |
|
|
| The column name (e.g., The This allows you to create a new column with the same name as a previously deleted column |
|
|
| The column type corresponding to one of the metadata catalog data types |
|
| - | The initial column value after its creation, for example, after executing the It can be |
|
| - | The default column value used in It can be |
|
| - | Specifies whether the column can contain |
22.7.12. axe_table_stats #
This metadata table contains statistics of analytical tables.
Column Name | Data Type | Constraint | Description |
|---|---|---|---|
|
| Primary key, foreign key | The ID of the analytical table for which statistics are collected, from the |
|
|
| The number of rows in the analytical table |
|
|
| The |
|
|
| The total size of all Parquet files of the analytical table, in bytes |
22.7.13. axe_table_column_stats #
This metadata table contains statistics of analytical table columns.
Column Name | Data Type | Constraint | Description |
|---|---|---|---|
|
| Primary key, foreign key | The ID of the analytical table that contains the column, from the |
|
| Primary key, foreign key | The ID of the column for which statistics are collected, from the |
|
|
| Specifies whether the column can contain |
|
| - | Specifies whether the column can contain This is relevant only for |
|
| - | The minimum column value. It is displayed as a string for consistency and must be converted to the current column data type when used |
|
| - | The maximum column value. It is displayed as a string for consistency and must be converted to the current column data type when used |
22.7.14. axe_partition_info #
This metadata table contains information about partitioned analytical tables.
Column Name | Data Type | Constraint | Description |
|---|---|---|---|
|
| Primary key | The partition ID assigned by increasing the |
|
| Foreign key, | The ID of the snapshot associated with creating the partitioned analytical table, from the |
|
| Foreign key | The ID of the snapshot associated with deleting the partitioned analytical table, from the If the value is |
|
| Foreign key, | The ID of the partitioned analytical table, from the |
For more information about Hive partitioning, refer to Chapter 23.
22.7.15. axe_partition_column #
This metadata table contains information about partition columns of analytical tables.
Column Name | Data Type | Constraint | Description |
|---|---|---|---|
|
| Foreign key | The ID of the partition that contains the column, from the |
|
| Foreign key, | The ID of the column, from the |
|
| Foreign key, | The ID of the analytical table that contains the column, from the |
|
|
| The sequence number of the column in the partition starting at 0. For example, if a partition contains columns A, B, and C, the |
A partition can contain multiple columns. The combination of the partition_id value and the column_id value identifies the column in the partition.
For more information about Hive partitioning, refer to Chapter 23.
22.7.16. axe_file_partition_value #
This metadata table maps Parquet files to partitions of analytical tables.
Column Name | Data Type | Constraint | Description |
|---|---|---|---|
|
| Foreign key | The ID of the Parquet file, from the |
|
| Foreign key, | The ID of the analytical table that contains the Parquet file, from the |
|
|
| The |
|
|
| The value of the partition column identified by the All rows in the Parquet file have the same value for this column |
Parquet files can be associated with multiple partitions. The combination of the data_file_id value and the partition_key_index value identifies the partition to which a file belongs.
For more information about Hive partitioning, refer to Chapter 23.
22.7.17. axe_files_scheduled_for_deletion #
This metadata table contains information about Parquet files associated with snapshots that are marked as expired. You can delete these files using the axe.cleanup_old_files stored procedure.
Column Name | Data Type | Constraint | Description |
|---|---|---|---|
|
| Primary key, foreign key | The ID of the Parquet file, from the |
|
| Foreign key | The ID of the storage that contains the Parquet file, from the |
|
|
| The path to the Parquet file (e.g., |
|
|
| Specifies whether the path to the Parquet file is relative to the path to the analytical table or absolute. Default value: |
|
|
| The date and time when the Parquet file is scheduled for deletion |
22.7.18. Examples of Snapshot Usage #
Creating a storage registers an entry in the axe_storage metadata table. For this update, a new snapshot is created and registered in the axe_snapshot metadata table. The registered entries are associated using the begin_snapshot field of the axe_snapshot metadata table.
The current schema_version and next_catalog_id fields of the axe_snapshot metadata table are increased by one since the metadata was updated, and new entries were registered in metadata tables.
Deleting a storage does not delete it physically. Instead, the end_snapshot field of the storage entry in the axe_storage metadata table is set, and the storage can no longer be used. For this update, a new snapshot is created and registered in the axe_snapshot metadata table. The registered entries are associated using the end_snapshot field of the axe_snapshot metadata table.
The current schema_version field of the axe_snapshot metadata table is increased by one, and the next_catalog_id field remains the same, since the metadata was updated, but no new entries were registered in metadata tables.
Creating an analytical table registers an entry in the axe_table metadata table and N entries in the axe_column metadata table. For these updates, N+1 new snapshots are created and registered in the axe_snapshot metadata table. The registered entries of the analytical table and its columns are associated using the begin_snapshot field of the axe_snapshot metadata table.
The current schema_version field of the axe_snapshot metadata table is increased by one, and the next_catalog_id field is increased by N+1 since the metadata was updated, and new entries were registered in metadata tables. The schema_version field is only increased by one because all updates were made in a single SQL command.
The next_catalog_id+1 field is used as the table_id field for the new analytical table in the axe_table metadata table, whereas the next_catalog_id+1+N fields are used as the column_id fields for new columns in the axe_column metadata table.
Adding Parquet files to an analytical table registers entries for one or multiple Parquet files in the axe_data_file metadata table. For this update, N new snapshots are created and registered in the axe_snapshot metadata table. The registered entries of the Parquet files are associated using the begin_snapshot field of the axe_snapshot metadata table.
The current schema_version and next_catalog_id fields of the axe_snapshot metadata table remain the same since the metadata was not updated, and no new entries were registered in metadata tables.
The next_file_id field of the axe_snapshot metadata table is increased by one, and the next_file_id+N fields are used as the data_file_id fields for new Parquet files in the axe_data_file metadata table.