> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# /show/table

```
URL: http://<db.host>:<db.port>/show/table
```

Retrieves detailed information about a table, view, or schema, specified in
input parameter *table\_name*. If the supplied input parameter *table\_name* is a
schema the call can return information about either the schema itself or the
tables and views it contains. If input parameter *table\_name* is empty,
information about all schemas will be returned.

If the option *get\_sizes* is set to *true*, then the number of records in each
table is returned (in output parameter *sizes* and output parameter
*full\_sizes*), along with the total number of objects across all requested
tables (in output parameter *total\_size* and output parameter
*total\_full\_size*).

For a schema, setting the *show\_children* option to *false* returns only
information about the schema itself; setting *show\_children* to *true* returns
a list of tables and views contained in the schema, along with their
corresponding detail.

To retrieve a list of every table, view, and schema in the database, set input
parameter *table\_name* to '\*' and *show\_children* to *true*.  When doing this,
the returned output parameter *total\_size* and output parameter
*total\_full\_size* will not include the sizes of non-base tables (e.g., filters,
views, joins, etc.).

## Input Parameter Description

<ParamField body="table_name" type="string">
  Name of the table for which to retrieve the information, in \[schema\_name.]table\_name format, using standard [name resolution rules](../../concepts/tables/#table-name-resolution). If blank, then returns information about all tables and views.
</ParamField>

<ParamField body="options" type="map of string to strings">
  Optional parameters.

  The default value is an empty map ( \{} ).

  <Expandable title="options">
    <ParamField body="dependencies">
      Include view dependencies in the output.

      The default value is `false`.

      The supported values are:

      * true
      * false
    </ParamField>

    <ParamField body="force_synchronous">
      If *true* then the table sizes will wait for read lock before returning.

      The default value is `true`.

      The supported values are:

      * true
      * false
    </ParamField>

    <ParamField body="get_access_data">
      If *true* then data about the last read, write, alter and create will be returned.

      The default value is `false`.

      The supported values are:

      * true
      * false
    </ParamField>

    <ParamField body="get_cached_sizes">
      If *true* then the number of records in each table, along with a cumulative count, will be returned; blank, otherwise. This version will return the sizes cached at rank 0, which may be stale if there is a multihead insert occurring.

      The default value is `false`.

      The supported values are:

      * true
      * false
    </ParamField>

    <ParamField body="get_sizes">
      If *true* then the number of records in each table, along with a cumulative count, will be returned; blank, otherwise.

      The default value is `false`.

      The supported values are:

      * true
      * false
    </ParamField>

    <ParamField body="referencing_materialized_views">
      Include materialized views using this table as a source in the output.

      The default value is `false`.

      The supported values are:

      * true
      * false
    </ParamField>

    <ParamField body="skip_additional_info">
      If *true* then the response will not populate the additional\_info field.

      The default value is `false`.

      The supported values are:

      * true
      * false
    </ParamField>

    <ParamField body="no_error_if_not_exists">
      If *false* will return an error if the provided input parameter *table\_name* does not exist. If *true* then it will return an empty result.

      The default value is `false`.

      The supported values are:

      * true
      * false
    </ParamField>

    <ParamField body="skip_temp_schemas">
      If *true* then the table list will not include tables from SYS\_TEMP and other system temporary schemas.  This is the default behavior for non-admin users.

      The default value is `false`.

      The supported values are:

      * true
      * false
    </ParamField>

    <ParamField body="show_children">
      If input parameter *table\_name* is a schema, then *true* will return information about the tables and views in the schema, and *false* will return information about the schema itself. If input parameter *table\_name* is a table or view, *show\_children* must be *false*. If input parameter *table\_name* is empty, then *show\_children* must be *true*.

      The default value is `true`.

      The supported values are:

      * true
      * false
    </ParamField>

    <ParamField body="get_column_info">
      If *true* then column info (memory usage, etc) will be returned.

      The default value is `false`.

      The supported values are:

      * true
      * false
    </ParamField>
  </Expandable>
</ParamField>

## Output Parameter Description

The Kinetica server embeds the endpoint response inside a standard response structure which contains status information and the actual response to the query.  Here is a description of the various fields of the wrapper:

<ResponseField name="status" type="String">
  'OK' or 'ERROR'
</ResponseField>

<ResponseField name="message" type="String">
  Empty if success or an error message
</ResponseField>

<ResponseField name="data_type" type="String">
  'show\_table\_response' or 'none' in case of an error
</ResponseField>

<ResponseField name="data" type="String">
  Empty string
</ResponseField>

<ResponseField name="data_str" type="JSON or String">
  This embedded JSON represents the result of the /show/table endpoint:

  <Expandable title="data_str">
    <ResponseField name="table_name" type="string">
      Value of input parameter *table\_name*.
    </ResponseField>

    <ResponseField name="table_names" type="array of strings">
      If input parameter *table\_name* is a table or view, then the single element of the array is input parameter *table\_name*. If input parameter *table\_name* is a schema and *show\_children* is set to *true*, then this array is populated with the names of all tables and views in the given schema; if *show\_children* is *false*, then this array will only include the schema name itself. If input parameter *table\_name* is an empty string, then the array contains the names of all tables in the user's default schema.
    </ResponseField>

    <ResponseField name="table_descriptions" type="array of arrays of strings">
      List of descriptions for the respective tables in output parameter *table\_names*.

      The supported values are:

      * COLLECTION
      * JOIN
      * LOGICAL\_EXTERNAL\_TABLE
      * LOGICAL\_VIEW
      * MATERIALIZED\_EXTERNAL\_TABLE
      * MATERIALIZED\_VIEW
      * MATERIALIZED\_VIEW\_MEMBER
      * MATERIALIZED\_VIEW\_UNDER\_CONSTRUCTION
      * REPLICATED
      * RESULT\_TABLE
      * SCHEMA
      * VIEW
    </ResponseField>

    <ResponseField name="type_ids" type="array of strings">
      Type IDs of the respective tables in output parameter *table\_names*.
    </ResponseField>

    <ResponseField name="type_schemas" type="array of strings">
      Type schemas of the respective tables in output parameter *table\_names*.
    </ResponseField>

    <ResponseField name="type_labels" type="array of strings">
      Type labels of the respective tables in output parameter *table\_names*.
    </ResponseField>

    <ResponseField name="properties" type="array of maps of string to arrays of strings">
      Property maps of the respective tables in output parameter *table\_names*.
    </ResponseField>

    <ResponseField name="additional_info" type="array of maps of string to strings">
      Additional information about the respective tables in output parameter *table\_names*.

      <Expandable title="additional_info">
        <ResponseField name="request_avro_type">
          Method by which this table was created.

          The supported values are:

          * create\_table
          * create\_projection
          * create\_union
        </ResponseField>

        <ResponseField name="request_avro_json">
          The JSON representation of request creating this table.

          The default value is ''.
        </ResponseField>

        <ResponseField name="protected">
          No longer used.  Indicated whether the respective table was protected or not.

          The supported values are:

          * true
          * false
        </ResponseField>

        <ResponseField name="record_bytes">
          The number of in-memory bytes per record which is the sum of the byte sizes of all columns with property  'data'.
        </ResponseField>

        <ResponseField name="total_bytes">
          The total size in bytes of all data stored in the table.
        </ResponseField>

        <ResponseField name="collection_names">
          \[DEPRECATED--use schema\_name instead]  This will now contain the name of the schema for the table.  There can only be one schema for a table.
        </ResponseField>

        <ResponseField name="schema_name">
          The name of the schema for the table.  There can only be one schema for a table.
        </ResponseField>

        <ResponseField name="table_ttl">
          The value of the [time-to-live](../../concepts/ttl/) setting.  Not present for schemas.
        </ResponseField>

        <ResponseField name="remaining_table_ttl">
          The remaining [time-to-live](../../concepts/ttl/), in minutes, before the respective table expires (-1 if it will never expire).  Not present for schemas.
        </ResponseField>

        <ResponseField name="primary_key_type">
          The primary key type of the table (if it has a primary key).

          * **memory**: In-memory primary key.
          * **disk**: On-disk primary key.
        </ResponseField>

        <ResponseField name="foreign_keys">
          Semicolon-separated list of [foreign keys](../../concepts/tables/#foreign-key), of the format 'source\_column references target\_table(primary\_key\_column)'. Not present for schemas.

          The default value is ''.
        </ResponseField>

        <ResponseField name="foreign_shard_key">
          Foreign shard key description of the format: \<fk\_foreign\_key> references \<pk\_column\_name> from \<pk\_table\_name>(\<pk\_primary\_key>). Not present for schemas.

          The default value is ''.
        </ResponseField>

        <ResponseField name="partition_type">
          [Partitioning](../../concepts/tables/#partitioning) scheme used for this table.

          The default value is `NONE`.

          * **RANGE**: Using [range partitioning](../../concepts/tables/#partitioning-by-range).
          * **INTERVAL**: Using [interval partitioning](../../concepts/tables/#partitioning-by-interval).
          * **LIST**: Using [manual list partitioning](../../concepts/tables/#partitioning-by-list-manual).
          * **HASH**: Using [hash partitioning](../../concepts/tables/#partitioning-by-hash).
          * **SERIES**: Using [series partitioning](../../concepts/tables/#partitioning-by-series).
          * **NONE**: Using no partitioning.
        </ResponseField>

        <ResponseField name="partition_keys">
          Comma-separated list of partition keys.

          The default value is ''.
        </ResponseField>

        <ResponseField name="partition_definitions">
          Comma-separated list of partition definitions, whose format depends on the partition\_type.  See [partitioning](../../concepts/tables/#partitioning) documentation for details.

          The default value is ''.
        </ResponseField>

        <ResponseField name="is_automatic_partition">
          True if partitions will be created for LIST VALUES which don't fall into existing partitions.

          The default value is ''.
        </ResponseField>

        <ResponseField name="attribute_indexes">
          Semicolon-separated list of indexes. For [column (attribute) indexes](../../concepts/indexes/#column-index), only the indexed column name will be listed. For other index types, the index type will be listed with the colon-delimited indexed column(s) and the comma-delimited index option(s) using the form:  \<index\_type>@\<column\_list>@\<column\_options>.  Not present for schemas.

          The default value is ''.
        </ResponseField>

        <ResponseField name="column_info">
          JSON-encoded string representing a map of column name to information including memory usage if the *get\_column\_info* option is *true*.

          The default value is ''.
        </ResponseField>

        <ResponseField name="global_access_mode">
          Returns the global access mode (i.e. lock status) for the table.

          * **no\_access**: No read/write operations are allowed on this table.
          * **read\_only**: Only read operations are allowed on this table.
          * **write\_only**: Only write operations are allowed on this table.
          * **read\_write**: All read/write operations are allowed on this table.
        </ResponseField>

        <ResponseField name="view_table_name">
          For materialized view the name of the view this member table is part of - if same as the table\_name then this is the root of the view.

          The default value is ''.
        </ResponseField>

        <ResponseField name="is_view_persisted">
          True if the view named view\_table\_name is persisted - reported for each view member.  Means method of recreating this member is saved - not the members data.

          The default value is ''.
        </ResponseField>

        <ResponseField name="is_dirty">
          True if some input table of the materialized view that affects this member table has been modified since the last refresh.

          The default value is ''.
        </ResponseField>

        <ResponseField name="refresh_method">
          For materialized view current refresh\_method - one of manual, periodic, on\_change.

          The default value is ''.
        </ResponseField>

        <ResponseField name="refresh_start_time">
          For materialized view with periodic refresh\_method the initial datetime string that periodic refreshes began.

          The default value is ''.
        </ResponseField>

        <ResponseField name="refresh_stop_time">
          Time at which the periodic view refresh stops.

          The default value is ''.
        </ResponseField>

        <ResponseField name="refresh_period">
          For materialized view with periodic refresh\_method the current refresh period in seconds.

          The default value is ''.
        </ResponseField>

        <ResponseField name="last_refresh_time">
          For materialized view the datetime string indicating the last time the view was refreshed.

          The default value is ''.
        </ResponseField>

        <ResponseField name="next_refresh_time">
          For materialized view with periodic refresh\_method a datetime string indicating the next time the view is to be refreshed.

          The default value is ''.
        </ResponseField>

        <ResponseField name="user_chunk_size">
          User-specified number of records per chunk, if provided at table creation time.

          The default value is ''.
        </ResponseField>

        <ResponseField name="user_chunk_column_max_memory">
          User-specified target max bytes per column in a chunk, if provided at table creation time.

          The default value is ''.
        </ResponseField>

        <ResponseField name="user_chunk_max_memory">
          User-specified target max bytes for all columns in a chunk, if provided at table creation time.

          The default value is ''.
        </ResponseField>

        <ResponseField name="owner_resource_group">
          Name of the owner resource group.

          The default value is ''.
        </ResponseField>

        <ResponseField name="alternate_shard_keys">
          Semicolon-separated list of shard keys that were equated in joins (applicable for join tables).

          The default value is ''.
        </ResponseField>

        <ResponseField name="datasource_subscriptions">
          Semicolon-separated list of datasource names the table has subscribed to.

          The default value is ''.
        </ResponseField>

        <ResponseField name="null_modifying_columns">
          Comma-separated list of null modifying column names.

          The default value is ''.
        </ResponseField>

        <ResponseField name="compression_codec">
          Default [compression codec](../../concepts/column_compression/) for the table.

          The default value is ''.
        </ResponseField>

        <ResponseField name="created_by">
          User that created this table or view.

          The default value is ''.
        </ResponseField>

        <ResponseField name="created_time">
          Time (UTC) when this table or view was created.

          The default value is ''.
        </ResponseField>

        <ResponseField name="last_read_by">
          User that last read this table or view.

          The default value is ''.
        </ResponseField>

        <ResponseField name="last_read_time">
          Time (UTC) when this table or view was last read.

          The default value is ''.
        </ResponseField>

        <ResponseField name="read_count">
          Count of times this table or view was read.

          The default value is ''.
        </ResponseField>

        <ResponseField name="last_write_by">
          User that last wrote to this table.

          The default value is ''.
        </ResponseField>

        <ResponseField name="last_write_time">
          Time (UTC) when this table was last written.

          The default value is ''.
        </ResponseField>

        <ResponseField name="write_count">
          Count of times this table was written.

          The default value is ''.
        </ResponseField>

        <ResponseField name="last_alter_by">
          User that last altered this table or view.

          The default value is ''.
        </ResponseField>

        <ResponseField name="last_alter_time">
          Time (UTC) when this table or view was last altered.

          The default value is ''.
        </ResponseField>

        <ResponseField name="alter_count">
          Count of times this table or view was altered.

          The default value is ''.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="sizes" type="array of longs">
      If *get\_sizes* is *true*, an array containing the number of records of each corresponding table in output parameter *table\_names*.  Otherwise, an empty array.
    </ResponseField>

    <ResponseField name="full_sizes" type="array of longs">
      If *get\_sizes* is *true*, an array containing the number of records of each corresponding table in output parameter *table\_names* (same values as output parameter *sizes*).  Otherwise, an empty array.
    </ResponseField>

    <ResponseField name="join_sizes" type="array of doubles">
      If *get\_sizes* is *true*, an array containing the number of unfiltered records in the cross product of the sub-tables of each corresponding join-table in output parameter *table\_names*. For simple tables, this number will be the same as output parameter *sizes*.  For join-tables, this value gives the number of joined-table rows that must be processed by any aggregate functions operating on the table.  Otherwise, (if *get\_sizes* is *false*), an empty array.
    </ResponseField>

    <ResponseField name="total_size" type="long">
      If *get\_sizes* is *true*, the sum of the elements of output parameter *sizes*.  Otherwise, -1.
    </ResponseField>

    <ResponseField name="total_full_size" type="long">
      If *get\_sizes* is *true*, the sum of the elements of output parameter *full\_sizes* (same value as output parameter *total\_size*).  Otherwise, -1.
    </ResponseField>

    <ResponseField name="info" type="map of string to strings">
      Additional information.
    </ResponseField>
  </Expandable>

  Empty string in case of an error.
</ResponseField>
