Version:

Show Table

Retrieves detailed information about tables, views, and collections.

If input parameter table_name specifies a table or view, information specific to that entity will be returned.

If input parameter table_name specifies a collection, the call can return information about either the collection itself (setting the show_children option to false) or the tables and views it contains (setting show_children to true).

If input parameter table_name is empty, information about all collections and top-level tables and views can be returned. Note: show_children must be set to true.

If input parameter table_name is '*', information about all tables, collections, and views will be returned. Note: show_children must be set to true.

If the option get_sizes is set to true, then the sizes (objects and elements) of each table are returned (in output parameter sizes and output parameter full_sizes), along with the total number of objects in the requested table (in output parameter total_size and output parameter total_full_size).

Input Parameter Description

Name Type Description
table_name string Name of the table for which to retrieve the information. If blank, then information about all collections and top-level tables and views is returned.
options map of string to strings

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

Supported Parameters (keys) Parameter Description
force_synchronous

If true then the table sizes will wait for read lock before returning. The supported values are:

  • true
  • false
get_sizes

If true then the table sizes will be returned; blank, otherwise. The supported values are:

  • true
  • false
show_children

If input parameter table_name is a collection, then true will return information about the children of the collection, while false will return information about the collection itself. If input parameter table_name is empty or '*', then show_children must be true (or not specified); otherwise, no results will be returned. The supported values are:

  • true
  • false
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 supported values are:

  • true
  • false
get_column_info

If true then column info (memory usage, etc) will be returned. The supported values are:

  • true
  • false

Output Parameter Description

Name Type Description
table_name string Value of input parameter table_name.
table_names 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 collection and show_children is set to true, then this array is populated with the names of all tables and views contained by the given collection; if show_children is false then this array will only include the collection name itself. If input parameter table_name is an empty string, then the array contains the names of all collections and top-level tables.
table_descriptions array of arrays of strings

List of descriptions for the respective tables in output parameter table_names. Possible values are:

  • COLLECTION
  • VIEW
  • REPLICATED
  • JOIN
  • RESULT_TABLE
type_ids array of strings Type ids of the respective tables in output parameter table_names.
type_schemas array of strings Type schemas of the respective tables in output parameter table_names.
type_labels array of strings Type labels of the respective tables in output parameter table_names.
properties array of maps of string to arrays of strings Property maps of the respective tables in output parameter table_names.
additional_info array of maps of string to strings

Additional information about the respective tables in output parameter table_names.

Possible List Entries Description
map of string to strings

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

Possible Parameters (keys) Parameter Description
request_avro_type

Method by which this table was created. Possible values are:

  • create_table
  • create_projection
  • create_union
request_avro_json The JSON representation of request creating this table.
allow_homogeneous_tables

Only present if the respective table is a collection. The value indicates whether the collection is allowed to contain multiple tables or views of the same type or not. Possible values are:

  • true
  • false
protected

Indicates whether the respective table is protected or not. Possible values are:

  • true
  • false
record_bytes The number of in-memory bytes per record which is the sum of the byte sizes of all columns with property 'data'.
collection_names The names of the collections this table is part of. Only set if table is part of a collection
table_ttl The value of the time-to-live setting. Not present for collections.
remaining_table_ttl The remaining time-to-live, in minutes, before the respective table expires (-1 if it will never expire). Not present for collections.
memory_ttl The value of the time-to-live in minutes for unqueried column data to stay in memory. Not present for collections or if not set for this table.
foreign_keys Semicolon-separated list of foreign keys, of the format 'source_column references target_table(primary_key_column)'. Not present for collections.
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 collections.
attribute_indexes Semicolon-separated list of columns that have indexes. Not present for collections.
compressed_columns Semicolon-separated list of compressed columns with the corresponding compression type for each; e.g.: {first_name,snappy};{last_name,lz4hc}. Not present for collections.
column_info JSON-encoded string representing a map of column name to information including memory usage if the get_column_info option is true.
global_access_mode

Returns the global access mode (i.e. lock status) for the table.

Possible Values Description
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.
view_table_name If this entity is a member of a materialized view, the name of that view. If this name is the same as the view's name, then this is the root of the view.
is_view_persisted

If this entity is a member of a materialized view, whether that view is persisted. If true, signifies that the method of recreating this member is saved, but not its data. Possible values are:

  • true
  • false
is_dirty

If this entity is a member of a materialized view, whether some input table of the materialized view that affects this member table has been modified since the last refresh. Possible values are:

  • true
  • false
refresh_method

If this entity is a member of a materialized view, the current refresh method of that view. Possible values are:

  • manual
  • periodic
  • on_change
refresh_start_time If this entity is a member of a materialized view with a periodic refresh method, the current initial date/time that the view's periodic refreshes began
refresh_period If this entity is a member of a materialized view with a periodic refresh method, the current refresh period of that view in seconds.
last_refresh_time If this entity is a member of a materialized view, the last date/time that view was refreshed.
next_refresh_time If this entity is a member of a materialized view with a periodic refresh method, the next date/time that view is to be refreshed.
sizes array of longs Empty array if the get_sizes option is false. Otherwise, sizes of the respective tables represented in output parameter table_names. For all but track data types, this is simply the number of total objects in a table. For track types, since each track semantically contains many individual objects, the output parameter sizes are the counts of conceptual tracks (each of which may be associated with multiple objects).
full_sizes array of longs Empty array if the get_sizes option is false. Otherwise, number of total objects in the respective tables represented in output parameter table_names. For all but track data types, this is the same as output parameter sizes. For track types, since each track semantically contains many individual objects, output parameter full_sizes is the count of total objects.
join_sizes array of doubles Empty array if the get_sizes option is false. Otherwise, number of unfiltered objects in the cross product of the sub-tables in the joined-tables represented 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.
total_size long -1 if the get_sizes option is false. Otherwise, the sum of the elements of output parameter sizes.
total_full_size long -1 if the get_sizes option is false. The sum of the elements of output parameter full_sizes.