Skip to main content

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.

Catalog Column List

APPLICABLE_ROLES

Each record in APPLICABLE_ROLES represents a user or role.

CHARACTER_SETS

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

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.

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).

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.

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.

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.

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.

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

DATABASES

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

ENABLED_ROLES

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

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.

FUNCTIONS

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

INDEXES

Each record in INDEXES represents a single index of a table with indexed columns.

INFORMATION_SCHEMA_CATALOG_NAME

INFORMATION_SCHEMA_CATALOG_NAME contains a single record with the database catalog name.

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).

KI_BACKUP_HISTORY

Each record in KI_BACKUP_HISTORY represents a single backup event. It will include all types of backups and also include the data sink through which the backup was created.

KI_CATALOG_VERSION

KI_CATALOG_VERSION contains a single record with the database version.

KI_DATASOURCE_SUBSCRIPTIONS

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

KI_HA_CONSUMERS

Each record in KI_HA_CONSUMERS represents a process that consumes messages from the Kafka HA queues.

KI_KAFKA_LAG_INFO

Each record in KI_KAFKA_LAG_INFO represents a partition of a subscription a single target table has through a single Kafka data source and the indexes of the most recently read message and most recently available messages on that partition.

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.

KI_PERIODIC_OBJECTS

Each record in KI_PERIODIC_OBJECTS represents a single materialized view or SQL procedure in the database with a periodic refresh/execution interval.

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.
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.

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:
This table will only show queries run by the user making the request, or all queries if the user has system administrator privilege.

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.
This table will only show queries run by the user making the request, or all queries if the user has system administrator privilege.

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.
This table will only show queries run by the user making the request, or all queries if the user has system administrator privilege.

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.

KI_RESTORE_HISTORY

Each record in KI_RESTORE_HISTORY represents a single restoration event. It will include restorations from all types of backups and also include the data source through which the backup was restored.

KI_STREAMS

Each record in KI_STREAMS represents a single stream (table monitor).

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.

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.

PARTITIONS

Each record in PARTITIONS represents a single partition of a partitioned table.

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).

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.

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).

TABLE_PRIVILEGES

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

TABLES

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

VIEWS

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