SYSHADOOP.HCAT_TABLEPARTS view

The SYSHADOOP.HCAT_TABLEPARTS view shows the partitions for all Db2 DATALAKE tables as defined by the Hive catalogs. The contents of this view might not be available if the Hive metastore is unavailable.

When you access the SYSHADOOP.HCAT_TABLEPARTS view, you are querying the Hive metastore for each table that is returned. If you filter the set of tables that you want to view by TABSCHEMA and TABNAME, you can improve the access time to this view.

Table 1. SYSHADOOP.HCAT_TABLEPARTS view
Column Type Description
TABSCHEMA VARCHAR(128) The Db2 schema in which the table resides.
TABNAME VARCHAR(128) The name of the Db2 table.
HIVESCHEMA VARCHAR(128) The name of the Hive schema in which the table resides as defined in the Hive metastore.
HIVETAB VARCHAR(128) The name of the table as defined in the Hive metastore.
CRTIME INT The creation time in number of seconds since 1970 UTC.
LOCATION VARCHAR(4000) The path at which the partition is stored.
VALUE VARCHAR(1000) The value or values combination of the partitioning column or columns that identify the partition.

Examples

Find all of the partitions:
SELECT * FROM SYSHADOOP.HCAT_TABLEPARTS;