/show/table
URL: http://GPUDB_IP_ADDRESS:GPUDB_PORT/show/table
Retrieves detailed information about a particular GPUdb table, specified in input parameter table_name. If the supplied input parameter table_name is a collection, the call returns a list of tables contained in the collection, and for each table it returns the description, type id, schema, type label, type properties, and additional information including TTL. If input parameter table_name is empty it will return all top-level tables including all collections and top-level child tables (i.e. tables with no parent).
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).
If the option 'show_children' is set to 'false' then for a collection it only returns information about the collection itself, not about the child tables. If 'show_children' is set to 'true' then it will return information about each of the children, but not the collection.
Running with 'show_children' = 'true' on a child table will return an error.
Running with 'show_children' = 'false' with input parameter table_name empty will return an error.
If the requested table is blank, then information is returned about all top-level tables including collections.
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 is returned. |
options |
map of
strings |
Optional parameters. Default value is an empty map ( {} ).
Supported
Parameters
(keys) |
Parameter Description |
get_sizes |
If 'true' then the table sizes will be returned; otherwise they will be returned blank. Default value is 'false'. The allowed values are:
|
show_children |
If input parameter table_name is a collection, then 'true' will return information about the children of the collection, and 'false' will return information about the collection itself. If input parameter table_name is a child table, 'show_children' must be 'false'. If input parameter table_name is empty then 'show_children' must be 'true'. Default value is 'true'. The allowed values are:
|
|
The GPUdb 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:
Name |
Type |
Description |
status |
String |
'OK' or 'ERROR' |
message |
String |
Empty if success or an error message |
data_type |
String |
'show_table_request' or 'none' in case of an error |
data |
String |
Empty string |
data_str |
JSON
or
String |
This embedded JSON represents the result of the /show/table endpoint:
Name |
Type |
Description |
table_name |
string |
Value of input parameter table_name. |
table_names |
array
of
strings |
If the table is a child-type table, then the single element of the array is input parameter table_name. If the table is a collection and 'show_children' is set to 'true', then this array is populated with the names of all child tables
of the given collection. If 'show_children' is 'false' then this array will only include the collection itself. . If input parameter table_name is an empty string, then the array contains the names of all top-level tables in GPUdb. |
table_descriptions |
array
of
arrays
of
strings |
List of descriptions for the respective tables in output parameter table_names. Values include: 'COLLECTION','VIEW','REPLICATED','JOIN' The allowed values are:
- COLLECTION
- VIEW
- REPLICATED
- JOIN
|
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
arrays
of
strings |
Property maps of the respective tables in output parameter table_names. |
additional_info |
array
of maps
of
strings |
Additional information about the respective tables in output parameter table_names.
Supported List
Entries |
Description |
map of strings |
Default value is an empty map ( {} ).
Supported Parameters
(keys) |
Parameter Description |
allow_homogenous_tables |
Only present if the respective table is a collection. The value indicates whether the table allows duplicate children or not. The allowed values are:
|
protected |
Indicates whether the respective table is protected or not. The allowed values are:
|
table_ttl |
The value of TTL setting, in minutes, for the respective table (-1 if it will never expire). This is not the remaining amount of time before the table expires. Not present for collections. |
remaining_table_ttl |
The remaining amount of minutes before the respective table expires (-1 if it will never expire). This value may be different from the table's TTL setting. Not present for collections. |
foreign_keys |
Semicolon-separated list of foreign key constraints, of the format 'my_field references primary_table(primary_key_field)'. Not present for collections. Default value is ''. |
attribute_indexes |
Semicolon-separated list of columns that have attribute indexes. Not present for collections. Default value is ''. |
|
|
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 'size' is the count 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 sizes. For track types, since
each track semantically contains many individual objects, the 'full size' 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 size. 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. |
Empty string in case of an error.
|