ANSI Virtual Catalog

Overview

The ANSI Virtual Catalog tables represent Kinetica's implementation of the Schemata section of the ISO/IEC 9075 (SQL:2003) database specification. This section defines the metadata tables that exist under the INFORMATION_SCHEMA schema. These tables contain information about the database's objects, relationships, & permissions.

Most of the metadata tables are implemented as logical views of the Kinetica Virtual Catalog tables, while some are logical views of other ANSI Virtual Catalog logical views. As such, they will be updated automatically to reflect changes in the database structure and processing state.

The information returned when querying the virtual catalogs is automatically filtered by the permissions of the querying user. For instance, regular users will only see the tables & views to which they have access when querying a virtual catalog table that lists all of the tables in the database, while system administrators will see all tables & views.

Catalog View List

The ANSI Virtual Catalog tables reside in the information_schema schema.

Virtual Catalog TableDescription
APPLICABLE_ROLESUsers & roles. This is only a simple list, one record per unique user or role--it is not a list of mappings of roles to users and roles to roles.
CHARACTER_SETSContains a single record with the supported character set, UTF-8.
COLUMNSColumns of tables & views and their respective types & statistics.
CONSTRAINT_COLUMN_USAGEColumns with constraints and their containing schemas.
CONTEXT_RULESRules sections of SQL-GPT contexts.
CONTEXT_SAMPLESSamples sections of SQL-GPT contexts.
CONTEXT_TABLE_COLUMNSColumns of tables associated with SQL-GPT contexts.
CONTEXT_TABLESTables associated with SQL-GPT contexts.
CONTEXTSSQL-GPT contexts and their configuration.
DATABASESContains a single record with the database name and owner.
ENABLED_ROLESUsers & roles.
FIELDSColumns of tables & views and their respective types & statistics, also containing the object type of the containing table/view.
FUNCTIONSScalar, aggregate, window, and user-defined functions.
INFORMATION_SCHEMA_CATALOG_NAMEContains a single record with the catalog name, kinetica.
KEY_COLUMN_USAGEPrimary & foreign keys and their associated columns.
KI_CATALOG_VERSIONContains a single record with the virtual catalog schema version.
KI_DATASOURCE_SUBSCRIPTIONSRemote data subscriptions, associating data sources with their target load tables.
KI_LOAD_HISTORYRecord & statistics of each data load or export, subscription event, and data refresh.
KI_QUERY_ACTIVEActively running SQL statements, including DML & DDL.
KI_QUERY_HISTORYHistory of SQL statements run within the database, including DML & DDL; will not include multi-head ingest/egress.
KI_QUERY_SPAN_METRICSProcessing metrics of SQL statements run within the database, including DML & DDL; will not include multi-head ingest/egress.
KI_QUERY_SPAN_METRICS_BY_SQL_STEPProcessing metrics of SQL statements run within the database, aggregated on each execution phase of a given query/command.
KI_QUERY_WORKERSWorker ranks' status and their actively running tasks.
MV_DEPENDENCIESObject dependencies for materialized views.
OBJECT_PRIVILEGESPrivileges granted, including the grantee, privilege type, and object to which access was granted.
REFERENTIAL_CONSTRAINTSForeign keys and their referenced unique constraints.
ROLE_TABLE_GRANTSEffectively, an alias for the TABLE_PRIVILEGES table.
SCHEMATASchemas, containing all database objects.
TABLE_CONSTRAINTSPrimary & foreign keys and their respective types & statistics.
TABLE_PRIVILEGESPrivileges granted on tables & views.
TABLESTables & views and their respective types & statistics.
VIEWSViews and their respective definitions & statistics.

Catalog Column List


APPLICABLE_ROLES

Each record in APPLICABLE_ROLES represents a user or role.

Column NameColumn TypeDescription
ROLE_NAMEVARCHAR(256)Name of this user or role.
GRANTEEVARCHARNot used.
ROLE_OWNERVARCHAR(8)Always admin.
IS_GRANTABLEBOOLEANWhether this is a role or not.

CHARACTER_SETS

Each record in CHARACTER_SETS represents an available character set. Kinetica supports the UTF-8 character set only.

Column NameColumn TypeDescription
CHARACTER_SET_CATALOGVARCHARNot used.
CHARACTER_SET_SCHEMAVARCHARNot used.
CHARACTER_SET_NAMEVARCHAR(4)Always UTF8.
CHARACTER_REPERTOIREVARCHAR(4)Always UCS.
FORM_OF_USEVARCHAR(4)Always UTF8.
DEFAULT_COLLATE_CATALOGVARCHAR(8)Always KINETICA.
DEFAULT_COLLATE_SCHEMAVARCHARNot used.
DEFAULT_COLLATE_NAMEVARCHARNot used.

COLUMNS

Each record in COLUMNS represents a single column in a table or view for all tables & views in the database, including those in virtual catalog tables.

Column NameColumn TypeDescription
TABLE_CATALOGVARCHAR(8)Always kinetica.
TABLE_SCHEMAVARCHAR(256)Name of the schema containing this column's table.
TABLE_NAMEVARCHAR(256)Name of the table containing this column.
COLUMN_NAMEVARCHAR(256)Name of this column.
ORDINAL_POSITIONINTEGERPosition of this column in its table, using a 0-based index.
COLUMN_DEFAULTVARCHAR(256)The default value expression applied to this column. See Data Replacement for options.
IS_NULLABLEBOOLEANWhether this column can be set to null.
DATA_TYPEVARCHAR(256)Name of the SQL data type.
CHARACTER_MAXIMUM_LENGTHINTEGERSize, in bytes, of this data type; -1 indicates variable length.
CHARACTER_OCTET_LENGTHINTEGERAlways 0.
NUMERIC_PRECISIONINTEGERPrecision of fixed-precision data types.
NUMERIC_PRECISION_RADIXINTEGERAlways 0.
NUMERIC_SCALEINTEGERScale of fixed-scale data types.
DATETIME_PRECISIONINTEGERPrecision of fixed-precision data types.
INTERVAL_TYPEVARCHAR(4)Not used.
INTERVAL_PRECISIONINTEGERPrecision of fixed-precision data types.
CHARACTER_SET_CATALOGVARCHARNot used.
CHARACTER_SET_SCHEMAVARCHARNot used.
CHARACTER_SET_NAMEVARCHARNot used.
COLLATION_CATALOGVARCHARNot used.
COLLATION_SCHEMAVARCHARNot used.
COLLATION_NAMEVARCHARNot used.
DOMAIN_CATALOGVARCHARNot used.
DOMAIN_SCHEMAVARCHARNot used.
DOMAIN_NAMEVARCHARNot used.
UDT_CATALOGVARCHARNot used.
UDT_SCHEMAVARCHARNot used.
UDT_NAMEVARCHAR(256)Name of the data type.
SCOPE_CATALOGVARCHARNot used.
SCOPE_SCHEMAVARCHARNot used.
SCOPE_NAMEVARCHARNot used.
MAXIMUM_CARDINALITYINTEGERAlways 0.
DTD_IDENTIFIERVARCHARNot used.
IS_SELF_REFERENCINGVARCHARNot used.
IS_IDENTITYBOOLEANAlways FALSE.
IDENTITY_GENERATIONBOOLEANAlways FALSE.
IDENTITY_STARTVARCHARNot used.
IDENTITY_INCREMENTVARCHARNot used.
IDENTITY_MAXIMUMVARCHARNot used.
IDENTITY_MINIMUMVARCHARNot used.
IDENTITY_CYCLEVARCHARNot used.
COMMENTVARCHARUser comment associated with this column.

CONSTRAINT_COLUMN_USAGE

Each record in CONSTRAINT_COLUMN_USAGE represents a constrained primary key column from either a primary key or foreign key relationship. For example, a table with a single primary key column will have one record in this table, while a composite foreign key linking two columns of one table to two columns of another will have two records in this table--one for each of the columns on the target side of the relation. Effectively, primary keys will be listed once for themselves, and then once for each instance of their participation in a foreign key relationship.

For foreign keys, the table/column information in CONSTRAINT_COLUMN_USAGE refers to the target side of the relation (the foreign table referenced by the key), whereas the table/column information in KEY_COLUMN_USAGE refers to the source side of the relation (where the key is defined).

Column NameColumn TypeDescription
CONSTRAINT_CATALOGVARCHAR(8)Always kinetica.
CONSTRAINT_SCHEMAVARCHAR(256)For primary keys, the name of the schema containing this constrained table; for foreign keys, the name of the schema containing the foreign table referenced by this constraint.
CONSTRAINT_NAMEVARCHAR(256)Name of this constraint.
TABLE_CATALOGVARCHAR(8)Always kinetica.
TABLE_SCHEMAVARCHAR(256)For primary keys, the name of the schema containing this constrained table; for foreign keys, the name of the schema containing the foreign table referenced by this constraint.
TABLE_NAMEVARCHAR(256)For primary keys, the name of the table containing this constrained column; for foreign keys, the name of the foreign table referenced by this constraint.
CONSTRAINT_TYPEVARCHAR(16)

Type of constraint; one of:

  • PRIMARY KEY
  • FOREIGN KEY
COLUMN_NAMEVARCHAR(256)For primary keys, the name of this constrained column; for foreign keys, the name of this constrained column in the foreign table referenced by this constraint.

CONTEXT_RULES

Each record in CONTEXT_RULES represents a rule that applies within a SQL-GPT context. For instance, a context with two globally-applicable context rules and three table-specific context rules will have five entries in this table.

Column NameColumn TypeDescription
TABLE_OBJ_IDVARCHAR(256)Composited identifier for the group this context rule is in. A SQL-GPT context will have one unique ID for the group of globally-applicable rules and an individual unique ID for each group of table-specific rules. This ID and RULE_INDEX identify a unique record in this table.
CONTEXT_NAMEVARCHAR(256)Fully-qualified name of the SQL-GPT context containing this context rule.
TABLE_NAMEVARCHAR(256)

Name of this SQL-GPT context rule object, denoting the type of context rule it is.

NameDescription
rulesGlobally-applicable rule definition
<schema_name.table_name>Table-specific rule definition
RULE_INDEXINTEGER0-based index of this context rule within its rule group.
RULEVARCHARThe context rule for the corresponding table, if TABLE_NAME is a table reference; or a global rule associated with the overall context, if TABLE_NAME is rules.

CONTEXT_SAMPLES

Each record in CONTEXT_SAMPLES represents a question-to-query mapping that applies within a SQL-GPT context. For instance, a context with two context samples will have two entries in this table.

Column NameColumn TypeDescription
OBJ_IDVARCHAR(256)Composited unique identifier for this context sample.
CONTEXT_NAMEVARCHAR(256)Fully-qualified name of the SQL-GPT context containing this context sample.
SAMPLE_INDEXINTEGER0-based index of this context sample within the SQL-GPT context.
QUESTIONVARCHARThe natural language question to associate with the corresponding SQL query in SQL_TEXT.
SQL_TEXTVARCHARThe SQL query that answers the natural language question posed in QUESTION.

CONTEXT_TABLE_COLUMNS

Each record in CONTEXT_TABLE_COLUMNS represents a column in a table associated with a SQL-GPT context table definition and both the column comment from the table's schema and the context comment from the context table definition, if present. Each of the table's columns will have its own record, regardless of whether the column has an associated comment in the corresponding table definition or not. For instance, a context containing a table definition with three column comments for a table with five columns will have five records in this catalog table, three of which will be listed with their associated context comments.

Column NameColumn TypeDescription
TABLE_OBJ_IDVARCHAR(256)Composited identifier for the context table this column is in. A SQL-GPT context will have one unique ID for each table defined within it. This ID and either COLUMN_NAME or COLUMN_POSITION identify a unique record in this table.
CONTEXT_NAMEVARCHAR(256)Fully-qualified name of the SQL-GPT context containing the table definition associated with the table containing this column.
TABLE_NAMEVARCHAR(256)Name of the table containing this column.
COLUMN_NAMEVARCHAR(256)Name of this column.
COLUMN_POSITIONINTEGER0-based index of this column within its containing table.
COLUMN_TYPEVARCHAR(32)SQL data type of this column.
COMMENTVARCHARThe table schema comment for this column, if present.
CONTEXT_COMMENTVARCHARThe context comment for this column, if present.

CONTEXT_TABLES

Each record in CONTEXT_TABLES represents a table referenced within a SQL-GPT context table definition. For instance, a context referencing two tables will have two entries in this table.

Column NameColumn TypeDescription
TABLE_OBJ_IDVARCHAR(256)Composited identifier for this table, referenced in the associated context table definition. A SQL-GPT context will have one unique ID for each table referenced in its table definitions.
CONTEXT_NAMEVARCHAR(256)Fully-qualified name of the SQL-GPT context referencing this table in one of its table definitions.
TABLE_NAMEVARCHAR(256)Name of this table, referenced in the associated context table definition.
CONTEXT_COMMENTVARCHARThe context comment for this table, if present.
COMMENTVARCHARThe table schema comment for this table, if present.

CONTEXTS

Each record in CONTEXTS represents a top-level object within a SQL-GPT context. Objects can be one of the following:

  • Table Definition - Rules, samples & comments that apply to the use of the given table specifically
  • Rules Definition - Rules that apply globally when using the context
  • Samples Definition - Samples that apply globally when using the context
Column NameColumn TypeDescription
OIDBIGINTUnique identifier associated with this SQL-GPT context object.
CONTEXT_NAMEVARCHAR(256)Name of the SQL-GPT context containing this context object.
SCHEMA_OIDBIGINTUnique identifier associated with the schema containing the parent SQL-GPT context. See SCHEMATA.
SCHEMA_NAMEVARCHAR(256)Name of the schema containing the parent SQL-GPT context.
OBJECT_NAMEVARCHAR(256)

Name of this SQL-GPT context object, denoting the type of context object it is.

NameDescription
rulesRules Definition
samplesSamples Definition
<schema_name.table_name>Table Definition for the given table name
OBJECT_DESCRIPTIONVARCHARThe COMMENT associated with the table, if context object is a table definition.
OBJECT_RULESVARCHAR[]The RULES associated with the table, if context object is a table definition; or the global rules associated with the overall context, if a rules definition.
OBJECT_COMMENTSJSONThe COMMENTS associated with the table, if context object is a table definition--essentially, the column definitions for the table.
OBJECT_SAMPLESJSONThe SAMPLES associated with the table, if context object is a table definition; or the global samples associated with the overall context, if a samples definition.
IS_TEMP_CONTEXTBOOLEANWhether this context is temporary and will be removed when either its time-to-live expires or the database is restarted, whichever comes first.
TTLINTEGERTime-to-live, in seconds, for this context; if this context is not used for the associated TTL time span, it will be automatically removed.

DATABASES

DATABASES contains a single record with the database name and owner.

Column NameColumn TypeDescription
DATABASE_NAMEVARCHAR(4)Always root.
DATABASE_OWNERVARCHAR(8)Always admin.
IS_TRANSIENTBOOLEANAlways FALSE.
COMMENTVARCHARNot used.
CREATEDBIGINTNot used.
LAST_ALTEREDBIGINTNot used.

ENABLED_ROLES

Each record in ENABLED_ROLES represents either a user or role name.

Column NameColumn TypeDescription
ROLE_NAMEVARCHAR(256)Name of this user or role.
ROLE_OWNERVARCHAR(8)Always admin.

FIELDS

Each record in FIELDS represents a single column in a table or view for all tables & views in the database, including those in virtual catalog tables.

Column NameColumn TypeDescription
OBJECT_CATALOGVARCHAR(8)Always kinetica.
OBJECT_SCHEMAVARCHAR(256)Name of the schema containing this column's table.
OBJECT_NAMEVARCHAR(256)Name of the table containing this column.
OBJECT_TYPEVARCHAR(8)

Type of object containing this column; one of:

  • TABLE (local or external)
  • VIEW (logical or materialized)
ROW_IDENTIFIERBIGINTNot used.
FIELD_NAMEVARCHAR(256)Name of this column.
ORDINAL_POSITIONINTEGERPosition of this column in its table, using a 0-based index.
IS_NULLABLEBOOLEANWhether this column can be set to null.
DATA_TYPEVARCHAR(256)Name of the SQL data type.
CHARACTER_MAXIMUM_LENGTHINTEGERSize, in bytes, of this data type; -1 indicates variable length.
CHARACTER_OCTET_LENGTHINTEGERAlways 0.
CHARACTER_SET_CATALOGVARCHARNot used.
CHARACTER_SET_SCHEMAVARCHARNot used.
CHARACTER_SET_NAMEVARCHARNot used.
COLLATION_CATALOGVARCHARNot used.
COLLATION_SCHEMAVARCHARNot used.
COLLATION_NAMEVARCHARNot used.
NUMERIC_PRECISIONINTEGERPrecision of fixed-precision data types.
NUMERIC_PRECISION_RADIXINTEGERAlways 0.
NUMERIC_SCALEINTEGERScale of fixed-scale data types.
DATETIME_PRECISIONINTEGERPrecision of fixed-precision data types.
INTERVAL_TYPEVARCHAR(4)Not used.
INTERVAL_PRECISIONINTEGERPrecision of fixed-precision data types.
DOMAIN_DEFAULTVARCHARNot used.
UDT_CATALOGVARCHARNot used.
UDT_SCHEMAVARCHARNot used.
UDT_NAMEVARCHARNot used.
SCOPE_CATALOGVARCHARNot used.
SCOPE_SCHEMAVARCHARNot used.
SCOPE_NAMEVARCHARNot used.
MAXIMUM_CARDINALITYINTEGERNot used.
DTD_IDENTIFIERINTEGERNot used.

FUNCTIONS

Each record in FUNCTIONS represents a native scalar or aggregate function, a UDF/UDTF, or a SQL procedure.

Column NameColumn TypeDescription
FUNCTION_CATALOGVARCHAR(8)Always kinetica.
FUNCTION_SCHEMAVARCHAR(256)Name of the schema containing this function. Native functions and UDFs are located in the pg_catalog schema, while SQL procedures are located in the schema specified by the user during creation.
FUNCTION_NAMEVARCHAR(256)Name of this function.
FUNCTION_OWNERVARCHAR(256)Not used.
ARGUMENT_SIGNATUREVARCHAR[]Names of the data types of this function's parameters. See ki_datatypes.
DATA_TYPEVARCHAR(256)Name of the return type of this function. See ki_datatypes.
CHARACTER_MAXIMUM_LENGTHINTEGERSize, in bytes, of this function's return data type; -1 indicates variable length.
CHARACTER_OCTET_LENGTHINTEGERAlways 0.
NUMERIC_PRECISIONINTEGERPrecision of this function's return data type, if fixed-precision.
NUMERIC_PRECISION_RADIXINTEGERAlways 0.
NUMERIC_SCALEINTEGERScale of this function's return data type, if fixed-scale.
FUNCTION_LANGUAGEVARCHAR(256)Language in which this SQL procedure was written (for SQL procedures; always SQL).
FUNCTION_DEFINITIONVARCHAR(256)Not used.
VOLATILITYBOOLEANAlways FALSE.
IS_NULL_CALLVARCHARNot used.
CREATEDTIMESTAMPTimestamp of function creation.
LAST_ALTEREDTIMESTAMPTimestamp of the most recent function update (initially, time of creation).
COMMENTVARCHARNot used.

INFORMATION_SCHEMA_CATALOG_NAME

INFORMATION_SCHEMA_CATALOG_NAME contains a single record with the database catalog name.

Column NameColumn TypeDescription
CATALOG_NAMEVARCHAR(8)Always kinetica.

KEY_COLUMN_USAGE

Each record in KEY_COLUMN_USAGE represents a key column from either a primary key or foreign key relationship. For example, a table with a single primary key column will have one record in this table, while a composite foreign key linking two columns of one table to two columns of another will have two records in this table--one for each of the columns on the source side of the relation.

For foreign keys, the table/column information in KEY_COLUMN_USAGE refers to the source side of the relation (where the key is defined), whereas the table/column information in CONSTRAINT_COLUMN_USAGE refers to the target side of the relation (the foreign table referenced by the key).

Column NameColumn TypeDescription
CONSTRAINT_CATALOGVARCHAR(8)Always kinetica.
CONSTRAINT_SCHEMAVARCHAR(256)For primary keys, the name of the schema containing this constrained table; for foreign keys, the name of the schema containing the table on the source side of this constraint.
CONSTRAINT_NAMEVARCHAR(256)Name of this constraint.
TABLE_CATALOGVARCHAR(8)Always kinetica.
TABLE_SCHEMAVARCHAR(256)For primary keys, the name of the schema containing this constrained table; for foreign keys, the name of the schema containing the table on the source side of this constraint.
TABLE_NAMEVARCHAR(256)For primary keys, the name of the table containing this constrained column; for foreign keys, the name of the table on the source side of this constraint.
COLUMN_NAMEVARCHAR(256)For primary keys, the name of this constrained column; for foreign keys, the name of this constrained column in the table on the source side of this constraint.
ORDINAL_POSITIONINTEGER0-based index of the position of this key column among all columns in the constrained table. For primary key constraints, this will be the index of this column among all columns in the constrained table; for foreign key constraints, this will be the index of this column among all columns in the table on the source side of the constraint.

KI_CATALOG_VERSION

KI_CATALOG_VERSION contains a single record with the database version.

Column NameColumn TypeDescription
CATALOG_VERSIONINTEGERVersion of the virtual catalog schema.

KI_DATASOURCE_SUBSCRIPTIONS

Each record in KI_DATASOURCE_SUBSCRIPTIONS represents a subscription a single target table has through a single data source.

Column NameColumn TypeDescription
SCHEMA_NAMEVARCHAR(256)Name of the schema containing the target table.
OBJECT_NAMEVARCHAR(256)Name of the target table subscribed through the data source.
DATASOURCE_SCHEMAVARCHAR(256)Name of the schema containing the data source.
DATASOURCE_NAMEVARCHAR(256)Name of the data source subscribed through by the table.
DATASOURCE_KINDVARCHAR(16)Type of the data source; see CREATE DATA SOURCE for supported providers.
STATUSVARCHAR(16)Current status of the subscription through the data source.
JOBIDBIGINTSystem job ID associated with the data source.
INFOVARCHARJSON block of details about the data source.

KI_LOAD_HISTORY

Each record in KI_LOAD_HISTORY represents a process that was invoked during either an import into or export from the database. Multiple processes may be invoked for a single data processing task.

Column NameColumn TypeDescription
TABLE_SCHEMAVARCHAR(256)Name of the schema containing the table involved in the data transfer operation.
TABLE_NAMEVARCHAR(256)Name of the table involved in the data transfer operation.
DATASOURCE_SCHEMAVARCHAR(256)Name of the schema containing the data source or data sink referenced in DATASOURCE_NAME.
DATASOURCE_NAMEVARCHAR(256)Name of the data source or data sink used for this data transfer (for those that make use of either).
USER_NAMEVARCHAR(256)Name of the user who initiated the data transfer.
JOB_IDBIGINTUnique identifier of the system job responsible for the data transfer.
START_TIMETIMESTAMPTimestamp of data transfer process start.
END_TIMETIMESTAMPTimestamp of data transfer process end.
ROWS_PROCESSEDBIGINTNumber of records processed for this import/export.
ROWS_INSERTEDBIGINTNumber of records processed for this data transfer, totalling those that were either successfully imported into Kinetica or exported into a remote database (for imports of any kind and exports to tables).
ROWS_SKIPPEDBIGINTNumber of records processed for this import, totalling those that were skipped due to errors in the data (for imports).
EVENT_MESSAGEVARCHAR

System messages relevant to the load process, including:

  • error message relating to skipped records or other, if applicable (for imports)
  • Cancelled, denoting a data load process was terminated
  • pause, denoting a data load subscription was stopped temporarily
  • resume, denoting a data load subscription was resumed after being paused
  • subscribe, denoting subscription-based data loads
  • unsubscribe, denoting a data load subscription was cancelled
NUM_ERRORBIGINTNumber of errors encountered during processing.
FILE_NAMEVARCHAR(64)Name of data file transferred, if any.
FILE_LINE_NUMBIGINTNot used.

KI_QUERY_ACTIVE

Each record in KI_QUERY_ACTIVE represents the portion of a given query or REST endpoint call being run on a given worker rank at the time this catalog table was queried. It returns general information about the query portion running on the given worker rank. See KI_QUERY_WORKERS for worker-specific details.

Note

This table will show one record per rank involved in multi-head requests; and will show one record, assessed at rank1, for non-multi-head requests.

Column NameColumn TypeDescription
JOB_IDBIGINTUnique identifier of the system job responsible for the query.
QUERY_IDUUIDUnique identifier of the query being run.
USER_NAMEVARCHAR(64)Name of the user who initiated the query.
RESOURCE_GROUPVARCHAR(64)Name of resource group governing this query's resource management.
SOURCE_IPVARCHAR(64)IP address of user who initiated the query.
ENDPOINTVARCHAR(64)REST endpoint called to initiate the request (for SQL-based requests).
EXECUTION_STATUSVARCHAR(32)

Status of the query processing.

StatusDescription
noneJob not yet queued for processing.
async job doneAsynchronous job completed successfully.
cancelledJob cancelled.
cancellingJob in the process of being cancelled.
dispatchedJob sent to worker ranks for processing.
done at TOMPortion of job completed on worker rank.
doneJob completed successfully.
errorJob completed with errors.
initializedPersistent job (e.g., PostgreSQL wireline connection) established.
local cleanupJob artifacts being removed before completion.
runningJob being processed on worker ranks.
ERROR_MESSAGEVARCHARError message associated with failed query.
START_TIMETIMESTAMPTimestamp of query processing start.
QUERY_TEXTVARCHARSQL command issued (for SQL-based requests).
USER_DATAVARCHARSupplemental information about the request.
SQL_STEP_COUNTINTEGERStep number in processing this SQL command (for SQL-based requests).
REFRESH_IDBIGINTUnique identifier of the materialized view refresh being performed (for materialized view refreshes).
IS_MHBOOLEANWhether the job is a multi-head ingest request.
IS_PERPETUALBOOLEAN

Whether the job has no fixed end time (e.g., Kafka streaming data feed).

CodeDescription
falseJob has a deterministic end time (fixed-size load).
trueJob has no deterministic end time (Kafka feed).
IS_CANCELLABLEBOOLEANWhether the job can be cancelled by a user.
IS_USING_TIMEOUTBOOLEANWhether the job can time out or not.
SOURCE_RANKINTEGERNumber of the rank associated with this job.

KI_QUERY_HISTORY

Each record in KI_QUERY_HISTORY represents a single query or REST endpoint call made to the database. It will include all SQL queries, but not direct calls to DML-related endpoints, like:

Note

This table will only show queries run by the user making the request, or all queries if the user has system administrator privilege.

Column NameColumn TypeDescription
JOB_IDBIGINTUnique identifier of the system job responsible for the query.
QUERY_IDUUIDUnique identifier of the query.
USER_NAMEVARCHAR(64)Name of the user who initiated the query.
ENDPOINTVARCHAR(64)REST endpoint called to initiate the request (for SQL-based requests).
EXECUTION_STATUSVARCHAR(32)

Final status of the query processing.

StatusDescription
async job doneAsynchronous job completed successfully.
cancelledJob cancelled.
doneJob completed successfully.
errorJob completed with errors.
ERROR_MESSAGEVARCHARError message associated with failed query.
QUERY_TEXTVARCHARSQL command issued (for SQL-based requests).
USER_DATAVARCHARSupplemental information about the request.
START_TIMETIMESTAMPTimestamp of query processing start.
STOP_TIMETIMESTAMPTimestamp of query processing stop.
SQL_STEP_COUNTINTEGERStep number in processing this SQL command (for SQL-based requests).
REFRESH_IDBIGINTUnique identifier of the materialized view refresh performed (for materialized view refreshes).
RESOURCE_GROUPVARCHAR(64)Name of resource group that governed this query's resource management.
SOURCE_IPVARCHAR(64)IP address of user who initiated the query.

KI_QUERY_SPAN_METRICS

Each record in KI_QUERY_SPAN_METRICS represents an independent operation that was processed on a given rank in order to fulfill a given query request, along with the statistics collected for that operation. This table will have one entry for each rank involved in processing a given operation and the statistics collected for that rank, per step of the SQL executed.

Note

This table will only show queries run by the user making the request, or all queries if the user has system administrator privilege.

Column NameColumn TypeDescription
QUERY_IDUUIDUnique identifier of the query request. See KI_QUERY_ACTIVE & KI_QUERY_HISTORY.
SPAN_IDUNSIGNED BIGINTUnique identifier of the metric span for this query.
PARENT_SPAN_IDUNSIGNED BIGINTNot used.
OPERATORVARCHAR(32)Internal name for operation performed. Many operators will roughly match the name of the REST endpoints they serve.
SQL_STEPINTEGERStep number in processing this SQL command (for SQL-based requests).
METRIC_DATAJSONJSON block of collected metrics.
START_TIMETIMESTAMPTimestamp of operation start on the associated rank.
STOP_TIMETIMESTAMPTimestamp of operation stop on the associated rank.
SOURCE_RANKINTEGERNumber of the rank on which this portion of the operation was processed and metrics collected.

KI_QUERY_SPAN_METRICS_BY_SQL_STEP

Each record in KI_QUERY_SPAN_METRICS_BY_SQL_STEP represents the aggregated statistics of independent operations that were processed in order to fulfill a given step of a query request. This table will have one entry for each SQL step and the aggregate statistics collected on operations that occurred during that step.

Note

This table will only show queries run by the user making the request, or all queries if the user has system administrator privilege.

Column NameColumn TypeDescription
QUERY_IDUUIDUnique identifier of the query request. See KI_QUERY_ACTIVE & KI_QUERY_HISTORY.
SQL_STEPINTEGERStep number in processing this SQL command (for SQL-based requests).
INS_LOCK_WAITVARCHARTotal time waiting for locks to process inserts.
INSERT_WAITVARCHARTotal time for processing inserts.
MEMORY_VRAM_NUM_EVICTIONSVARCHARTotal number of times data was evicted from the VRAM tier.
MEMORY_VRAM_PEAK_BYTES_USEDVARCHARLargest number of VRAM bytes used among operations in this step.
MEMORY_RAM_NUM_EVICTIONSVARCHARTotal number of times data was evicted from the RAM tier.
MEMORY_RAM_PEAK_BYTES_USEDVARCHARLargest number of RAM bytes used among operations in this step.
IO_DISK_CACHE_BYTES_READVARCHARTotal number of bytes read from the disk cache tier.
IO_DISK_CACHE_BYTES_WRITTENVARCHARTotal number of bytes written to the disk cache tier.
IO_PERSIST_NUM_EVICTIONSVARCHARTotal number of times data was evicted from the persist tier.
IO_PERSIST_BYTES_READVARCHARTotal number of bytes read from the persist tier.
IO_PERSIST_BYTES_WRITTENVARCHARTotal number of bytes written to the persist tier.
IO_COLD_BYTES_READVARCHARTotal number of bytes read from the cold storage tier.
IO_COLD_BYTES_WRITTENVARCHARTotal number of bytes written to the cold storage tier.

KI_QUERY_WORKERS

Each record in KI_QUERY_WORKERS represents the portion of a given query or REST endpoint call being run on a given worker rank at the time this catalog table was queried. It returns worker-specific information about the query portion running on the given worker rank. See KI_QUERY_ACTIVE for general query processing details.

Column NameColumn TypeDescription
JOB_IDBIGINTUnique identifier of the system job responsible for the query.
WORKER_IDBIGINTUnique identifier of the worker job responsible for its portion of the query.
TYPEVARCHAR(64)Type of worker process handling this portion of the query.
INTERNAL_NAMEVARCHAR(64)Internal name of worker process handling this portion of the query, if present.
TASK_INFOVARCHAR(64)Worker task-specific information.
THREAD_POOLVARCHAR(16)Type of thread pool being used to service this portion of the query.
STATUSVARCHAR(16)

Status of the processing of this portion of the query--one of:

  • cancelled
  • completed
  • failed
  • paused
  • running
BLOCKERSVARCHAR(128)Any dependencies that may be blocking the execution of this portion of the query.
SQL_STEPINTEGERStep number in processing this SQL command (for SQL-based requests).
FINAL_MSG_SETBOOLEANWhether the final status has been recorded for this portion of the query.
RUNNING_TASK_COUNTINTEGERNumber of running tasks relating to this portion of the query.
QUEUED_TASK_COUNTINTEGERNumber of queued tasks relating to this portion of the query.
PENDING_ASYNC_TASKSINTEGERNumber of asynchronous tasks not yet complete for this portion of the query.
ELAPSED_TIME_MSBIGINTNumber of milliseconds that have passed since processing began on this portion of the query.
EXCEPTIONVARCHAR(256)Any exception thrown during processing this portion of the query.
SOURCE_RANKINTEGERNumber of the rank on which this portion of the query is being processed.

MV_DEPENDENCIES

Each record in MV_DEPENDENCIES represents a dependent relationship, between a "source" object and an object that depends on it, that exists to support a materialized view; for example, a materialized view will depend on all of the tables & views referenced in its corresponding query.

Column NameColumn TypeDescription
MV_SCHEMAVARCHAR(256)The name of the schema containing the materialized view supported by this dependent relationship.
MV_NAMEVARCHAR(256)The name of the materialized view supported by this dependent relationship.
SOURCE_TABLE_SCHEMAVARCHAR(256)The name of the schema containing the object depended on by DEST_TABLE_NAME.
SOURCE_TABLE_NAMEVARCHAR(256)The name of the object depended on by DEST_TABLE_NAME.
SOURCE_TABLE_KINDVARCHAR(1)

Type of the source table depended on.

CodeDescription
EExternal table
HPartitioned table
IMaterialized view intermediate table
MMaterialized view
RRegular (local) table
DEST_TABLE_SCHEMAVARCHAR(256)The name of the schema containing the object that depends on SOURCE_TABLE_NAME.
DEST_TABLE_NAMEVARCHAR(256)The name of the object that depends on SOURCE_TABLE_NAME.

OBJECT_PRIVILEGES

Each record in OBJECT_PRIVILEGES represents the mapping of a user or role to a system-level or object-level permission they have.

Column NameColumn TypeDescription
GRANTORVARCHAR(256)Not used.
GRANTEEVARCHAR(256)Name of the user or role associated with this mapping.
OBJECT_CATALOGVARCHAR(8)Always kinetica.
OBJECT_SCHEMAVARCHAR(256)Name of the schema containing the granted object associated with this mapping.
OBJECT_NAMEVARCHAR(256)Name of the granted object associated with this mapping.
OBJECT_TYPEVARCHAR(256)

Type of object grant this mapping represents (for object-level permissions).

TypeDescription
contextSQL-GPT context
credentialCredential
datasinkData sink
datasourceData source
directoryKiFS directory
graphGraph
procSQL procedure or UDF/UDTF
schemaSchema
tableTable or view
table_monitorStream
PRIVILEGE_TYPEVARCHAR(256)Type of permission grant this mapping represents.
IS_GRANTABLEBOOLEANNot used.
WITH_HIERARCHYBOOLEANNot used.
CREATEDBIGINTNot used.

REFERENTIAL_CONSTRAINTS

Each record in REFERENTIAL_CONSTRAINTS represents a foreign key relationship, regardless of the number of columns involved in the key (whether a composite foreign key or not).

The table information in REFERENTIAL_CONSTRAINTS refers to the target side of the relation (the foreign table referenced by the key).

Column NameColumn TypeDescription
CONSTRAINT_CATALOGVARCHAR(8)Always kinetica.
CONSTRAINT_SCHEMAVARCHAR(256)The name of the schema containing the table on the source side of this constraint.
CONSTRAINT_NAMEVARCHAR(256)Name of this constraint.
UNIQUE_CONSTRAINT_CATALOGVARCHAR(8)Always kinetica.
UNIQUE_CONSTRAINT_SCHEMAVARCHAR(256)The name of the schema containing the foreign table referenced by this constraint.
UNIQUE_CONSTRAINT_NAMEVARCHAR(256)The auto-generated name of the primary key constraint that this foreign key references.
MATCH_OPTIONVARCHAR(8)Always FULL.
UPDATE_RULEVARCHAR(16)Always NO ACTION.
DELETE_RULEVARCHAR(16)Always NO ACTION.
COMMENTVARCHARNot used.
CREATEDTIMESTAMPTimestamp of constraint creation.
LAST_ALTEREDTIMESTAMPTimestamp of the most recent constraint update (initially, time of creation).

ROLE_TABLE_GRANTS

This is effectively an alias for the TABLE_PRIVILEGES table, as that table has only an additional CREATED column, which is presently unused.


SCHEMATA

Each record in SCHEMATA represents a schema in the database.

Column NameColumn TypeDescription
CATALOG_NAMEVARCHAR(8)Always kinetica.
SCHEMA_NAMEVARCHAR(256)Name of this schema.
SCHEMA_OWNERVARCHAR(256)Username of user who created this schema.
IS_TRANSIENTBOOLEANNot used.
RETENTION_TIMEBIGINTNot used.
DEFAULT_CHARACTER_SET_CATALOGVARCHAR(256)Not used.
DEFAULT_CHARACTER_SET_SCHEMAVARCHAR(256)Not used.
DEFAULT_CHARACTER_SET_NAMEVARCHAR(256)Not used.
SQL_PATHVARCHAR(256)Not used.
CREATEDTIMESTAMPTimestamp of schema creation.
LAST_ALTEREDTIMESTAMPTimestamp of the most recent schema modification (initially, time of creation).
COMMENTVARCHARUser comments associated with this schema.

TABLE_CONSTRAINTS

Each record in TABLE_CONSTRAINTS represents a primary key or a foreign key relationship, regardless of the number of columns involved in the key (whether a composite primary/foreign key or not).

For foreign keys, the table information in TABLE_CONSTRAINTS refers to the source side of the relation (where the key is defined).

Column NameColumn TypeDescription
CONSTRAINT_CATALOGVARCHAR(8)Always kinetica.
CONSTRAINT_SCHEMAVARCHAR(256)The name of the schema containing the table containing this constraint.
CONSTRAINT_NAMEVARCHAR(256)Name of this constraint.
TABLE_CATALOGVARCHAR(8)Always kinetica.
TABLE_SCHEMAVARCHAR(256)The name of the schema containing the table containing this constraint.
TABLE_NAMEVARCHAR(256)The name of the table containing this constraint.
CONSTRAINT_TYPEVARCHAR(16)

Type of constraint; one of:

  • PRIMARY KEY
  • FOREIGN KEY
IS_DEFERRABLEBOOLEAN

Whether the constraint is deferrable.

CodeDescription
falseConstraint is a primary key, non-deferrable in Kinetica.
trueConstraint is a foreign key, deferrable in Kinetica.
INITIALLY_DEFERREDBOOLEAN

Whether the constraint is initially deferred.

CodeDescription
falseConstraint is a primary key, not deferred in Kinetica.
trueConstraint is a foreign key, deferred in Kinetica.
ENFORCEDBOOLEAN

Whether the constraint is enforced.

CodeDescription
falseConstraint is a foreign key, unenforced in Kinetica.
trueConstraint is a primary key, enforced in Kinetica.
COMMENTVARCHARNot used.
CREATEDTIMESTAMPTimestamp of constraint creation.
LAST_ALTEREDTIMESTAMPTimestamp of the most recent constraint update (initially, time of creation).

TABLE_PRIVILEGES

Each record in TABLE_PRIVILEGES represents the mapping of a user or role to a table-level permission they have.

Column NameColumn TypeDescription
GRANTORVARCHAR(256)Not used.
GRANTEEVARCHAR(256)Name of the user or role associated with this mapping.
TABLE_CATALOGVARCHAR(8)Always kinetica.
TABLE_SCHEMAVARCHAR(256)Name of the schema containing the granted object associated with this mapping.
TABLE_NAMEVARCHAR(256)Name of the granted object associated with this mapping.
PRIVILEGE_TYPEVARCHAR(256)Type of permission grant this mapping represents.
IS_GRANTABLEBOOLEANNot used.
WITH_HIERARCHYBOOLEANNot used.
CREATEDTIMESTAMPNot used.

TABLES

Each record in TABLES represents a single table or view, within the database, including those in the virtual catalog tables.

Column NameColumn TypeDescription
TABLE_CATALOGVARCHAR(8)Always kinetica.
TABLE_SCHEMAVARCHAR(256)Name of the schema containing this table or view.
TABLE_NAMEVARCHAR(256)Name of this table or view.
TABLE_OWNERVARCHAR(256)Username of user who created this table or view.
TABLE_TYPEVARCHAR(16)

Table/view type.

TypeDescription
BASE TABLERegular (local) table or external table
VIEWLogical or materialized view
SELF_REFERENCING_COLUMN_NAMEVARCHAR(256)Not used.
IS_TRANSIENTBOOLEANNot used.
ROW_COUNTINTEGERNot used.
RETENTION_TIMEBIGINTTime-to-live for this table/view; -9999 if no timeout exists.
BYTESINTEGERNot used.
REFERENCE_GENERATIONVARCHAR(256)Not used.
USER_DEFINED_TYPE_CATALOGVARCHAR(256)Not used.
USER_DEFINED_TYPE_SCHEMAVARCHAR(256)Not used.
USER_DEFINED_TYPE_NAMEVARCHAR(256)Not used.
IS_INSERTABLE_INTOVARCHAR(256)Not used.
IS_TYPEDVARCHAR(256)Not used.
COMMIT_ACTIONVARCHAR(256)Not used.
CREATEDTIMESTAMPTimestamp of table/view creation.
LAST_ALTEREDTIMESTAMPTimestamp of the most recent table/view definition update (initially, time of creation).
COMMENTVARCHARUser comments associated with this table/view.

VIEWS

Each record in VIEWS represents a single logical view within the database, including those in the virtual catalog tables.

Column NameColumn TypeDescription
TABLE_CATALOGVARCHAR(8)Always kinetica.
TABLE_SCHEMAVARCHAR(256)Name of the schema containing this view.
TABLE_NAMEVARCHAR(256)Name of this view.
TABLE_OWNERVARCHAR(256)Username of user who created this view.
VIEW_DEFINITIONVARCHAR(256)Query that backs this view.
CHECK_OPTIONBOOLEANNot used.
IS_UPDATABLEBOOLEANNot used.
INSERTABLE_INTOBOOLEANNot used.
CREATEDTIMESTAMPTimestamp of view creation.
LAST_ALTEREDTIMESTAMPTimestamp of the most recent view definition update (initially, time of creation).
COMMENTVARCHARUser comments associated with this view.