GPUdb API object that provides access to GPUdb server functions.
Constructor
new GPUdb(url, optionsopt)
Creates a GPUdb API object for the specified URL using the given options.
Once created, all options are immutable; to use a different URL or change
options, create a new instance. (Creating a new instance does not
communicate with the server and should not cause performance concerns.)
Parameters:
Name
Type
Attributes
Description
url
String
The URL of the GPUdb server (e.g.,
http://hostname:9191).
options
Object
<optional>
A set of configurable options for the GPUdb API.
Properties
Name
Type
Attributes
Description
username
String
<optional>
The username to be used for authentication
to GPUdb. This username will be sent with every GPUdb request
made via the API along with the specified password and may be
used for authorization decisions by the server if it is so
configured. If neither username nor password is specified, no
authentication will be performed.
password
String
<optional>
The password to be used for authentication
to GPUdb. This password will be sent with every GPUdb request
made via the API along with the specified username and may be
used for authorization decisions by the server if it is so
configured. If neither username nor password is specified, no
authentication will be performed.
timeout
Number
<optional>
The timeout value, in milliseconds, after
which requests to GPUdb will be aborted. A timeout value of
zero is interpreted as an infinite timeout. Note that timeout
is not suppored for synchronous requests, which will not
return until a response is received and cannot be aborted.
The timeout value, in milliseconds, after which requests to GPUdb
will be aborted. A timeout of zero is interpreted as an infinite
timeout. Will be zero if none was provided to the GPUdb constructor.
Response object containing the method_codes of the
operation.
Type
Object
admin_verify_db(options, callback) → {Object}
Verify database is in a consistent state. When inconsistencies or errors
are found, the verified_ok flag in the response is set to false and the list
of errors found is provided in the error_list.
Verify database is in a consistent state. When inconsistencies or errors
are found, the verified_ok flag in the response is set to false and the list
of errors found is provided in the error_list.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Calculates unique combinations (groups) of values for the given columns in a
given table/view/collection and computes aggregates on each unique
combination. This is somewhat analogous to an SQL-style SELECT...GROUP BY.
Any column(s) can be grouped on, but only non-string (i.e. numeric) columns
may be used for computing aggregates. The results can be paged via the
{@code offset} and {@code limit} parameters. For example, to get 10 groups
with the largest counts the inputs would be: limit=10,
options={"sort_order":"descending", "sort_by":"value"}. {@code options} can
be used to customize behavior of this call e.g. filtering or sorting the
results. To group by 'x' and 'y' and compute the number of objects within
each group, use column_names=['x','y','count(*)']. To also compute the sum
of 'z' over each group, use column_names=['x','y','count(*)','sum(z)'].
Available aggregation functions are: 'count(*)', 'sum', 'min', 'max', 'avg',
'mean', 'stddev', 'stddev_pop', 'stddev_samp', 'var', 'var_pop', 'var_samp',
'arg_min', 'arg_max' and 'count_distinct'. The response is returned as a
dynamic schema. For details see: dynamic
schemas documentation. If the 'result_table' option is provided then the
results are stored in a table with the name given in the option and the
results are not returned in the response.
Parameters:
Name
Type
Description
table_name
String
Name of the table on which the operation will be
performed. Must be a valid table/view/collection
in GPUdb.
column_names
Array.<String>
List of one or more column names,
expressions, and aggregate expressions. Must
include at least one 'grouping' column or
expression. If no aggregate is included,
count(*) will be computed as a default.
offset
Number
A positive integer indicating the number of initial
results to skip (this can be useful for paging
through the results).
limit
Number
A positive integer indicating the maximum number of
results to be returned Or END_OF_SET (-9999) to
indicate that the max number of results should be
returned.
options
Object
Optional parameters.
expression: Filter expression to apply
to the table prior to computing the aggregate group
by.
having: Filter expression to apply to
the aggregated results.
sort_order: String indicating how the
returned values should be sorted - ascending or
descending. Values: ascending, descending.
sort_by: String determining how the
results are sorted. Values: key, value.
result_table: The name of the table
used to store the results. If present no results
are returned in the response.
Calculates unique combinations (groups) of values for the given columns in a
given table/view/collection and computes aggregates on each unique
combination. This is somewhat analogous to an SQL-style SELECT...GROUP BY.
Any column(s) can be grouped on, but only non-string (i.e. numeric) columns
may be used for computing aggregates. The results can be paged via the
{@code offset} and {@code limit} parameters. For example, to get 10 groups
with the largest counts the inputs would be: limit=10,
options={"sort_order":"descending", "sort_by":"value"}. {@code options} can
be used to customize behavior of this call e.g. filtering or sorting the
results. To group by 'x' and 'y' and compute the number of objects within
each group, use column_names=['x','y','count(*)']. To also compute the sum
of 'z' over each group, use column_names=['x','y','count(*)','sum(z)'].
Available aggregation functions are: 'count(*)', 'sum', 'min', 'max', 'avg',
'mean', 'stddev', 'stddev_pop', 'stddev_samp', 'var', 'var_pop', 'var_samp',
'arg_min', 'arg_max' and 'count_distinct'. The response is returned as a
dynamic schema. For details see: dynamic
schemas documentation. If the 'result_table' option is provided then the
results are stored in a table with the name given in the option and the
results are not returned in the response.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Performs a histogram calculation given a table, a column, and an interval
function. The {@code interval} is used to produce bins of that size and the
result, computed over the records falling within each bin, is returned. For
each bin, the start value is inclusive, but the end value is
exclusive--except for the very last bin for which the end value is also
inclusive. The value returned for each bin is the number of records in it,
except when a column name is provided as a *value_column* in {@code
options}. In this latter case the sum of the values corresponding to the
*value_column* is used as the result instead.
Parameters:
Name
Type
Description
table_name
String
Name of the table on which the operation will be
performed. Must be a valid table or collection
in GPUdb.
column_name
String
Name of a column or an expression of one or
more column names over which the histogram will
be calculated.
start
Number
Lower end value of the histogram interval, inclusive.
end
Number
Upper end value of the histogram interval, inclusive.
interval
Number
The size of each bin within the start and end
parameters.
options
Object
Optional parameters.
value_column: The name of the column
GPUdb will use when calculating the bin values
(values are summed). The column must be a
numerical type (int, double, long, float).
Performs a histogram calculation given a table, a column, and an interval
function. The {@code interval} is used to produce bins of that size and the
result, computed over the records falling within each bin, is returned. For
each bin, the start value is inclusive, but the end value is
exclusive--except for the very last bin for which the end value is also
inclusive. The value returned for each bin is the number of records in it,
except when a column name is provided as a *value_column* in {@code
options}. In this latter case the sum of the values corresponding to the
*value_column* is used as the result instead.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
This endpoint runs the k-means algorithm - a heuristic algorithm that
attempts to do k-means clustering. An ideal k-means clustering algorithm
selects k points such that the sum of the mean squared distances of each
member of the set to the nearest of the k points is minimized. The k-means
algorithm however does not necessarily produce such an ideal cluster. It
begins with a randomly selected set of k points and then refines the
location of the points iteratively and settles to a local minimum. Various
parameters and options are provided to control the heuristic search.
Parameters:
Name
Type
Description
table_name
String
Name of the table on which the operation will be
performed. Must be a valid table or collection
in GPUdb.
column_names
Array.<String>
List of column names on which the operation
would be performed. If n columns are
provided then each of the k result points
will have n dimensions corresponding to the
n columns.
k
Number
The number of mean points to be determined by the
algorithm.
tolerance
Number
Stop iterating when the distances between
successive points is less than the given
tolerance.
options
Object
Optional parameters.
whiten: When set to 1 each of the
columns is first normalized by its stdv - default
is not to whiten.
max_iters: Number of times to try to
hit the tolerance limit before giving up - default
is 10.
num_tries: Number of times to run the
k-means algorithm with a different randomly
selected starting points - helps avoid local
minimum. Default is 1.
This endpoint runs the k-means algorithm - a heuristic algorithm that
attempts to do k-means clustering. An ideal k-means clustering algorithm
selects k points such that the sum of the mean squared distances of each
member of the set to the nearest of the k points is minimized. The k-means
algorithm however does not necessarily produce such an ideal cluster. It
begins with a randomly selected set of k points and then refines the
location of the points iteratively and settles to a local minimum. Various
parameters and options are provided to control the heuristic search.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Calculates the requested statistics of a given column in a given table.
The available statistics are count (number of total objects), mean, stdv
(standard deviation), variance, skew, kurtosis, sum, min, max,
weighted_average, cardinality (unique count), estimated cardinality,
percentile and percentile_rank.
Estimated cardinality is calculated by using the hyperloglog approximation
technique.
Percentiles and percentile_ranks are approximate and are calculated using
the t-digest algorithm. They must include the desired
percentile/percentile_rank. To compute multiple percentiles each value must
be specified separately (i.e.
'percentile(75.0),percentile(99.0),percentile_rank(1234.56),percentile_rank(-5)').
The weighted average statistic requires a weight_attribute to be specified
in {@code options}. The weighted average is then defined as the sum of the
products of {@code column_name} times the weight attribute divided by the
sum of the weight attribute.
The response includes a list of the statistics requested along with the
count of the number of items in the given set.
Parameters:
Name
Type
Description
table_name
String
Name of the table on which the statistics
operation will be performed.
column_name
String
Name of the column for which the statistics are
to be calculated.
stats
String
Comma separated list of the statistics to calculate,
e.g. "sum,mean". Values: count, mean, stdv, variance,
skew, kurtosis, sum, min, max, weighted_average,
cardinality, estimated_cardinality, percentile,
percentile_rank.
options
Object
Optional parameters.
additional_column_names: A list of
comma separated column names over which statistics
can be accumulated along with the primary column.
weight_column_name: Name of column
used as weighting attribute for the weighted
average statistic.
Divides the given set into bins and calculates statistics of the values of a
value-column in each bin. The bins are based on the values of a given
binning-column. The statistics that may be requested are mean, stdv
(standard deviation), variance, skew, kurtosis, sum, min, max, first, last
and weighted average. In addition to the requested statistics the count of
total samples in each bin is returned. This counts vector is just the
histogram of the column used to divide the set members into bins. The
weighted average statistic requires a weight_column to be specified in
{@code options}. The weighted average is then defined as the sum of the
products of the value column times the weight column divided by the sum of
the weight column.
There are two methods for binning the set members. In the first, which can
be used for numeric valued binning-columns, a min, max and interval are
specified. The number of bins, nbins, is the integer upper bound of
(max-min)/interval. Values that fall in the range
[min+n\*interval,min+(n+1)\*interval) are placed in the nth bin where n
ranges from 0..nbin-2. The final bin is [min+(nbin-1)\*interval,max]. In the
second method, {@code options} bin_values specifies a list of binning column
values. Binning-columns whose value matches the nth member of the bin_values
list are placed in the nth bin. When a list is provided the binning-column
must be of type string or int.
Parameters:
Name
Type
Description
table_name
String
Name of the table on which the ranged-statistics
operation will be performed.
select_expression
String
For a non-empty expression statistics are
calculated for those records for which
the expression is true.
column_name
String
Name of the binning-column used to divide the
set samples into bins.
value_column_name
String
Name of the value-column for which
statistics are to be computed.
stats
String
A string of comma separated list of the statistics to
calculate, e.g. 'sum,mean'. Available statistics:
mean, stdv (standard deviation), variance, skew,
kurtosis, sum.
start
Number
The lower bound of the binning-column.
end
Number
The upper bound of the binning-column.
interval
Number
The interval of a bin. Set members fall into bin i
if the binning-column falls in the range
[start+interval``*``i, start+interval``*``(i+1)).
options
Object
Map of optional parameters:
additional_column_names: A list of
comma separated value-column names over which
statistics can be accumulated along with the
primary value_column.
bin_values: A list of comma separated
binning-column values. Values that match the nth
bin_values value are placed in the nth bin.
weight_column_name: Name of the column
used as weighting column for the weighted_average
statistic.
order_column_name: Name of the column
used for candlestick charting techniques.
Divides the given set into bins and calculates statistics of the values of a
value-column in each bin. The bins are based on the values of a given
binning-column. The statistics that may be requested are mean, stdv
(standard deviation), variance, skew, kurtosis, sum, min, max, first, last
and weighted average. In addition to the requested statistics the count of
total samples in each bin is returned. This counts vector is just the
histogram of the column used to divide the set members into bins. The
weighted average statistic requires a weight_column to be specified in
{@code options}. The weighted average is then defined as the sum of the
products of the value column times the weight column divided by the sum of
the weight column.
There are two methods for binning the set members. In the first, which can
be used for numeric valued binning-columns, a min, max and interval are
specified. The number of bins, nbins, is the integer upper bound of
(max-min)/interval. Values that fall in the range
[min+n\*interval,min+(n+1)\*interval) are placed in the nth bin where n
ranges from 0..nbin-2. The final bin is [min+(nbin-1)\*interval,max]. In the
second method, {@code options} bin_values specifies a list of binning column
values. Binning-columns whose value matches the nth member of the bin_values
list are placed in the nth bin. When a list is provided the binning-column
must be of type string or int.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Calculates the requested statistics of a given column in a given table.
The available statistics are count (number of total objects), mean, stdv
(standard deviation), variance, skew, kurtosis, sum, min, max,
weighted_average, cardinality (unique count), estimated cardinality,
percentile and percentile_rank.
Estimated cardinality is calculated by using the hyperloglog approximation
technique.
Percentiles and percentile_ranks are approximate and are calculated using
the t-digest algorithm. They must include the desired
percentile/percentile_rank. To compute multiple percentiles each value must
be specified separately (i.e.
'percentile(75.0),percentile(99.0),percentile_rank(1234.56),percentile_rank(-5)').
The weighted average statistic requires a weight_attribute to be specified
in {@code options}. The weighted average is then defined as the sum of the
products of {@code column_name} times the weight attribute divided by the
sum of the weight attribute.
The response includes a list of the statistics requested along with the
count of the number of items in the given set.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Returns all the unique values from a particular column (specified by {@code
column_name}) of a particular table (specified by {@code table_name}). If
{@code column_name} is a numeric column the values will be in {@code
binary_encoded_response}. Otherwise if {@code column_name} is a string
column the values will be in {@code json_encoded_response}. {@code offset}
and {@code limit} are used to page through the results if there are large
numbers of unique values. To get the first 10 unique values sorted in
descending order {@code options} would be::
{"limit":"10","sort_order":"descending"}.
The response is returned as a dynamic schema. For details see: dynamic
schemas documentation. If the 'result_table' option is provided then the
results are stored in a table with the name given in the option and the
results are not returned in the response.
Parameters:
Name
Type
Description
table_name
String
Name of the table on which the operation will be
performed. Must be a valid table in GPUdb.
column_name
String
Name of the column or an expression containing
one or more column names on which the unique
function would be applied.
offset
Number
A positive integer indicating the number of initial
results to skip (this can be useful for paging
through the results).
limit
Number
A positive integer indicating the maximum number of
results to be returned. Or END_OF_SET (-9999) to
indicate that the max number of results should be
returned.
options
Object
Optional parameters.
expression: Optional filter expression
to apply to the table.
sort_order: String indicating how the
returned values should be sorted. Values:
ascending, descending.
result_table: The name of the table
used to store the results. If present no results
are returned in the response.
Returns all the unique values from a particular column (specified by {@code
column_name}) of a particular table (specified by {@code table_name}). If
{@code column_name} is a numeric column the values will be in {@code
binary_encoded_response}. Otherwise if {@code column_name} is a string
column the values will be in {@code json_encoded_response}. {@code offset}
and {@code limit} are used to page through the results if there are large
numbers of unique values. To get the first 10 unique values sorted in
descending order {@code options} would be::
{"limit":"10","sort_order":"descending"}.
The response is returned as a dynamic schema. For details see: dynamic
schemas documentation. If the 'result_table' option is provided then the
results are stored in a table with the name given in the option and the
results are not returned in the response.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
The alter_system_properties endpoint is primarily used to simplify the
testing of GPUdb and is not expected to be used during normal execution.
Commands are given through the properties_update_map whose keys are commands
and values are strings representing integer values (for example '8000') or
boolean values ('true' or 'false').
Parameters:
Name
Type
Description
property_updates_map
Object
Map containing the properties of the
system to be updated. Error if empty.
sm_omp_threads: Set the
number of sm_omp_threads to the
specified integer value.
kernel_omp_threads: Set
the number of kernel_omp_threads to
the specified integer value.
concurrent_kernel_execution: Enables
concurrent kernel execution if the
value is 'true' and disables it if the
value is 'false'.
chunk_size: Sets the
chunk size of all new sets to the
specified integer value.
flush_to_disk: Flushes
any changes to any tables to the
persistent store. These changes
include updates to the vector store,
object store, and text search store,
Value string is ignored
clear_cache: Clears
cached results. Useful to allow
repeated timing of endpoints. Value
string is ignored
communicator_test: Invoke
the communicator test and report
timing results. Value string is is a
comma separated list of =
expressions. Expressions are:
num_transactions = where
is the number of request reply
transactions to invoke per test;
message_size = where bytes is
the size of the messages to send in
bytes; check_values = where
if enabled is true the value of the
messages received are verified.
set_message_timers_enabled: Enables
the communicator test to collect
additional timing statistics when the
value string is 'true'. Disables the
collection when the value string is
'false'
bulk_add_test: Invoke the
bulk_add test and report timing
results. Value string is ignored.
network_speed: Invoke the
network speed test and report timing
results. Value string is a comma
separated list of =
expressions. Expressions are: seconds
=
The alter_system_properties endpoint is primarily used to simplify the
testing of GPUdb and is not expected to be used during normal execution.
Commands are given through the properties_update_map whose keys are commands
and values are strings representing integer values (for example '8000') or
boolean values ('true' or 'false').
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Apply various modifications to a table or collection. Available
modifications include:
Creating or deleting an index on a particular column. This can speed up
certain search queries (such as /get/records, /delete/records,
/update/records) when using expressions containing equality or relational
operators on indexed columns. This only applies to child tables.
Making a table protected or not. Protected tables need the admin
password to be sent in a /clear/table to delete the table. This can be
applied to child tables or collections or views.
Setting the time-to-live (TTL). This can be applied to tables, views,
or collections. When applied to collections, every table & view within the
collection will have its TTL set to the given value.
Allowing homogeneous child tables. This only applies to collections.
Parameters:
Name
Type
Description
table_name
String
Table on which the operation will be performed.
Must be a valid table or collection in GPUdb.
action
String
Modification operation to be applied to the table or
collection Values: create_index, delete_index,
allow_homogeneous_tables, protected, ttl.
value
String
The value of the modification. May be a column name,
'true' or 'false', or a time-to-live depending on
{@code action}.
Updates (adds or changes) metadata for tables. The metadata key and values
must both be strings. This is an easy way to annotate whole tables rather
than single records within tables. Some examples of metadata are owner of
the table, table creation timestamp etc.
Parameters:
Name
Type
Description
table_names
Array.<String>
Names of the tables whose metadata will be
updated. All specified tables must exist in
GPUdb, or GPUdb will return an error.
metadata_map
Object
A map which contains the metadata of the
tables that are to be updated. Note that only
one map is provided for all the tables; so the
change will be applied to every table. If the
provided map is empty, then all existing
metadata for the table(s) will be cleared.
Updates (adds or changes) metadata for tables. The metadata key and values
must both be strings. This is an easy way to annotate whole tables rather
than single records within tables. Some examples of metadata are owner of
the table, table creation timestamp etc.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Response object containing the method_codes of the
operation.
Type
Object
alter_table_request(request, callback) → {Object}
Apply various modifications to a table or collection. Available
modifications include:
Creating or deleting an index on a particular column. This can speed up
certain search queries (such as /get/records, /delete/records,
/update/records) when using expressions containing equality or relational
operators on indexed columns. This only applies to child tables.
Making a table protected or not. Protected tables need the admin
password to be sent in a /clear/table to delete the table. This can be
applied to child tables or collections or views.
Setting the time-to-live (TTL). This can be applied to tables, views,
or collections. When applied to collections, every table & view within the
collection will have its TTL set to the given value.
Allowing homogeneous child tables. This only applies to collections.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Clears (drops) one or all tables in the GPUdb cluster. The operation is
synchronous meaning that the table will be cleared before the function
returns. The response payload returns the status of the operation along with
the name of the table that was cleared.
Parameters:
Name
Type
Description
table_name
String
Name of the table to be cleared. Must be an
existing GPUdb table. Empty string clears all
available tables in GPUdb.
Response object containing the method_codes of the
operation.
Type
Object
clear_table_request(request, callback) → {Object}
Clears (drops) one or all tables in the GPUdb cluster. The operation is
synchronous meaning that the table will be cleared before the function
returns. The response payload returns the status of the operation along with
the name of the table that was cleared.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Clears or cancels the trigger identified by the specified handle. The output
returns the handle of the trigger cleared as well as indicating success or
failure of the trigger deactivation.
Clears or cancels the trigger identified by the specified handle. The output
returns the handle of the trigger cleared as well as indicating success or
failure of the trigger deactivation.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Name of the join table to be created. Must
not be the name of a currently existing
GPUdb table or join table. Cannot be an
empty string.
table_names
Array.<String>
The list of table names making up the joined
set. Corresponds to a SQL statement FROM
clause
aliases
Array.<String>
The list of aliases for each of the corresponding
tables.
expression
String
An optional expression GPUdb uses to combine and
filter the joined set. Corresponds to a SQL
statement WHERE clause. For details see: expressions.
expressions
Array.<String>
An optional list of expressions GPUdb uses to
combine and filter the joined set.
Corresponds to a SQL statement WHERE clause.
For details see: expressions.
options
Object
Optional parameters.
collection_name: Name of a collection
in GPUdb to which the join table is to be assigned
as a child table. If empty, then the join table
will be a top level table.
max_query_dimensions: The maximum
number of tables in a joined table that can be
accessed by a query and are not equated by a
foreign-key to primary-key equality predicate
optimize_lookups: Use the applied
filters to precalculate the lookup table to get
data from the primary key sets
refresh_method: Method by which the
join table can be refreshed when underlying member
tables have changed. Values: manual, on_query,
on_insert.
refresh: Do a manual refresh of the
join table if it exists - throws an error otherwise
Values: no_refresh, refresh, full_refresh.
Response object containing the method_codes of the
operation.
Type
Object
create_role(name, options, callback) → {Object}
Creates a new role.
Parameters:
Name
Type
Description
name
String
Name of the role to be created. Must contain only
lowercase letters, digits, and underscores, and cannot
begin with a digit. Must not be the same name as an
existing user or role in GPUdb.
Creates a new table or collection in GPUdb. If a new table is being created
then type of the table is given by {@code type_id} which must the be the
type id of a currently registered type (i.e. one created via /create/type).
The table will be created inside a collection if the option
*collection_name* is specified. If that collection does not already exist
then it will be created. To create a new, empty collection specify the
collection name in {@code table_name}, leave {@code type_id} blank, and set
the *is_collection* option to 'true'.
Parameters:
Name
Type
Description
table_name
String
Name of the table to be created. Must not be the
name of a currently existing GPUdb table of a
different type. Error for requests with
existing table of the same name and type id may
be suppressed by using the {@code
no_error_if_exists} option. Cannot be an empty
string. Valid characters are 'A-Za-z0-9_-(){}[]
.:' (excluding the single quote), with the first
character being one of 'A-Za-z0-9_'. The
maximum length is 256 characters.
type_id
String
ID of a currently registered type in GPUdb. All
objects added to the newly created table will be of
this type. Must be an empty string if the
*is_collection* is 'true'.
options
Object
Optional parameters.
no_error_if_exists: If {@code true},
prevents an error from occurring if the table
already exists and is of the given type. If a
table with the same ID but a different type exists,
it is still an error. Values: true, false.
collection_name: Name of a collection
in GPUdb to which the newly created table is to be
assigned as a child table. If empty, then the newly
created table will be a top level table. If the
collection does not allow duplicate children, then
this table creation request will fail if there is
an existing child table with the same type id
specified in this request.
is_collection: Indicates whether the
new table to be created will be a collection. If
false, the created table will be a top level table.
Values: true, false.
disallow_homogeneous_tables: For a
collection, indicates whether multiple children of
exactly the same data type will be allowed. Values:
true, false.
is_replicated: For a Table, this is an
indication to GPUdb to replicate the table to all
the ranks. This is only required when the table
will be used to join with other tables in a query.
Values: true, false.
foreign_keys: Semicolon-separated list
of foreign key constraints, of the format 'my_field
references primary_table(primary_key_field)'.
Creates a monitor that watches for new records inserted into a particular
table (identified by {@code table_name}) and forwards copies to subscribers
via ZMQ. After this call completes, subscribe to the returned {@code
topic_id} on the GPUdb ZMQ table monitor port (default 9002). Each time an
insert operation on the table completes, a multipart message is published
for that topic; the first part contains only the topic ID, and each
subsequent part contains one binary-encoded Avro object that was inserted.
The monitor will continue to run (regardless of whether or not there are any
subscribers) until deactivated with /clear/tablemonitor.
Parameters:
Name
Type
Description
table_name
String
Name of the table to monitor. Must not refer to
a collection.
Creates a monitor that watches for new records inserted into a particular
table (identified by {@code table_name}) and forwards copies to subscribers
via ZMQ. After this call completes, subscribe to the returned {@code
topic_id} on the GPUdb ZMQ table monitor port (default 9002). Each time an
insert operation on the table completes, a multipart message is published
for that topic; the first part contains only the topic ID, and each
subsequent part contains one binary-encoded Avro object that was inserted.
The monitor will continue to run (regardless of whether or not there are any
subscribers) until deactivated with /clear/tablemonitor.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Creates a new table or collection in GPUdb. If a new table is being created
then type of the table is given by {@code type_id} which must the be the
type id of a currently registered type (i.e. one created via /create/type).
The table will be created inside a collection if the option
*collection_name* is specified. If that collection does not already exist
then it will be created. To create a new, empty collection specify the
collection name in {@code table_name}, leave {@code type_id} blank, and set
the *is_collection* option to 'true'.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Sets up an area trigger mechanism for two column_names for one or more
tables. (This function is essentially the two-dimensional version of
/create/trigger/byrange.) Once the trigger has been activated, any record
added to the listed tables(s) via /insert/records with the chosen columns'
values falling within the specified region will trip the trigger. All such
records will be queued at GPUdb's trigger port-by default '9001' but can
also be obtained via /show/system/status-for any listening client to
collect. Active triggers can be cancelled by using the /clear/trigger
endpoint or by clearing all relevant tables.
The output returns the trigger handle as well as indicating success or
failure of the trigger activation.
Parameters:
Name
Type
Description
request_id
String
ID for the trigger to be activated.
table_names
Array.<String>
Names of the tables on which the trigger will
be activated and maintained.
x_column_name
String
Name of a numeric column on which the trigger
is activated. Usually 'x' for geospatial data
points.
x_vector
Array.<Number>
The respective coordinate values for the region
on which the trigger is activated. This usually
translates to the x-coordinates of a geospatial
region.
y_column_name
String
Name of a second numeric column on which the
trigger is activated. Usually 'y' for
geospatial data points.
y_vector
Array.<Number>
The respective coordinate values for the region
on which the trigger is activated. This usually
translates to the y-coordinates of a geospatial
region. Must be the same length as xvals.
Sets up an area trigger mechanism for two column_names for one or more
tables. (This function is essentially the two-dimensional version of
/create/trigger/byrange.) Once the trigger has been activated, any record
added to the listed tables(s) via /insert/records with the chosen columns'
values falling within the specified region will trip the trigger. All such
records will be queued at GPUdb's trigger port-by default '9001' but can
also be obtained via /show/system/status-for any listening client to
collect. Active triggers can be cancelled by using the /clear/trigger
endpoint or by clearing all relevant tables.
The output returns the trigger handle as well as indicating success or
failure of the trigger activation.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Sets up a simple range trigger for a column_name for one or more tables.
Once the trigger has been activated, any record added to the listed
tables(s) via /insert/records with the chosen column_name's value falling
within the specified range will trip the trigger. All such records will be
queued at GPUdb's trigger port-by default '9001' but can also be obtained
via /show/system/status-for any listening client to collect. Active triggers
can be cancelled by using the /clear/trigger endpoint or by clearing all
relevant tables.
The output returns the trigger handle as well as indicating success or
failure of the trigger activation.
Parameters:
Name
Type
Description
request_id
String
ID for the trigger request.
table_names
Array.<String>
Tables on which the trigger will be active.
column_name
String
Name of a numeric column_name on which the
trigger is activated.
min
Number
The lower bound (inclusive) for the trigger range.
max
Number
The upper bound (inclusive) for the trigger range.
Sets up a simple range trigger for a column_name for one or more tables.
Once the trigger has been activated, any record added to the listed
tables(s) via /insert/records with the chosen column_name's value falling
within the specified range will trip the trigger. All such records will be
queued at GPUdb's trigger port-by default '9001' but can also be obtained
via /show/system/status-for any listening client to collect. Active triggers
can be cancelled by using the /clear/trigger endpoint or by clearing all
relevant tables.
The output returns the trigger handle as well as indicating success or
failure of the trigger activation.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Creates a new type in GPUdb describing the layout or schema of a table. The
type definition is a JSON string describing the fields (i.e. columns) of the
type. Each field consists of a name and a data type. Supported data types
are: double, float, int, long, string, and bytes. In addition one or more
properties can be specified for each column which customize the memory usage
and query availability of that column. Note that some properties are
mutually exclusive--i.e. they cannot be specified for any given column
simultaneously. One example of mutually exclusive properties are {@code
data} and {@code store_only}.
To set a *primary key* on one or more columns include the property
'primary_key' on the desired column_names. If a primary key is specified
then GPUdb enforces a uniqueness constraint in that only a single object can
exist with a given primary key. When /insert/records data into a table with
a primary key, depending on the parameters in the request, incoming objects
with primary keys that match existing objects will either overwrite (i.e.
update) the existing object or will be skipped and not added into the set.
Example of a type definition with some of the parameters::
a JSON string describing the columns of the
type to be registered.
label
String
A user-defined description string which can be used
to differentiate between tables and types with
otherwise identical schemas.
properties
Object
Each key-value pair specifies the properties to
use for a given column where the key is the
column name. All keys used must be relevant
column names for the given table. Specifying
any property overrides the default properties
for that column (which is based on the column's
data type).
Response object containing the method_codes of the
operation.
Type
Object
create_type_request(request, callback) → {Object}
Creates a new type in GPUdb describing the layout or schema of a table. The
type definition is a JSON string describing the fields (i.e. columns) of the
type. Each field consists of a name and a data type. Supported data types
are: double, float, int, long, string, and bytes. In addition one or more
properties can be specified for each column which customize the memory usage
and query availability of that column. Note that some properties are
mutually exclusive--i.e. they cannot be specified for any given column
simultaneously. One example of mutually exclusive properties are {@code
data} and {@code store_only}.
To set a *primary key* on one or more columns include the property
'primary_key' on the desired column_names. If a primary key is specified
then GPUdb enforces a uniqueness constraint in that only a single object can
exist with a given primary key. When /insert/records data into a table with
a primary key, depending on the parameters in the request, incoming objects
with primary keys that match existing objects will either overwrite (i.e.
update) the existing object or will be skipped and not added into the set.
Example of a type definition with some of the parameters::
Creates a table that is the concatenation of one or more existing tables. It
is equivalent to the SQL UNION ALL operator. Non-charN 'string' and 'bytes'
column types cannot be included in a union, neither can columns with the
property 'store_only'.
Parameters:
Name
Type
Description
table_name
String
Name of the table to be created. Must not be the
name of a currently existing GPUdb table. Cannot
be an empty string.
table_names
Array.<String>
The list of table names making up the union.
Must contain the names of one or more
existing tables.
input_column_names
Array.<Array.<String>>
The list of columns from each of the
corresponding input tables.
output_column_names
Array.<String>
The list of names of the columns to
be stored in the union.
options
Object
Optional parameters.
collection_name: Name of a collection
in GPUdb to which the union is to be assigned as a
child table. If empty, then the union will be a top
level table.
Creates a table that is the concatenation of one or more existing tables. It
is equivalent to the SQL UNION ALL operator. Non-charN 'string' and 'bytes'
column types cannot be included in a union, neither can columns with the
property 'store_only'.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Creates a new external user (a user whose credentials are managed by an
external LDAP).
Parameters:
Name
Type
Description
name
String
Name of the user to be created. Must exactly match the
user's name in the external LDAP, prefixed with a @.
Must not be the same name as an existing user in
GPUdb.
Creates a new internal user (a user whose credentials are managed by GPUdb).
Parameters:
Name
Type
Description
name
String
Name of the user to be created. Must contain only
lowercase letters, digits, and underscores, and cannot
begin with a digit. Must not be the same name as an
existing user or role in GPUdb.
password
String
Initial password of the user to be created. May be
an empty string for no password.
Deletes record(s) matching the provided criteria from the given table. The
record selection criteria can either be one or more {@code expressions}
(matching multiple records) or a single record identified by {@code
record_id} options. Note that the two selection criteria are mutually
exclusive. This operation cannot be run on a collection or a view. The
operation is synchronous meaning that a response will not be available until
the request is completely processed and all the matching records are
deleted.
Parameters:
Name
Type
Description
table_name
String
Name of the table from which to delete records.
The set must be a currently existing table and
not a collection or a view.
expressions
Array.<String>
A list of the actual predicates, one for each
select; format should follow the guidelines
provided /filter. Specifying one or more
{@code expressions} is mutually exclusive to
specifying {@code record_id} in the {@code
options}.
options
Object
Optional parameters.
global_expression: An optional global
expression to reduce the search space of the {@code
expressions}.
record_id: A record id identifying a
single record, obtained at the time of
/insert/records or by calling
/get/records/fromcollection with the
*return_record_ids* option.
Deletes record(s) matching the provided criteria from the given table. The
record selection criteria can either be one or more {@code expressions}
(matching multiple records) or a single record identified by {@code
record_id} options. Note that the two selection criteria are mutually
exclusive. This operation cannot be run on a collection or a view. The
operation is synchronous meaning that a response will not be available until
the request is completely processed and all the matching records are
deleted.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
The response message contains the number of points for which the expression
evaluated to be true, which is equivalent to the size of the result view.
Parameters:
Name
Type
Description
table_name
String
Name of the table to filter. This may be the ID
of a collection, table or a result set (for
chaining queries). Collections may be filtered
only if all tables within the collection have
the same type ID.
view_name
String
If provided, then this will be the name of the
view containing the results. Must not be an
already existing collection, table or view .
expression
String
The select expression GPUdb uses to filter the
specified table. For details see concepts.
Calculates which objects from a table are within a named area of interest
(NAI/polygon). The operation is synchronous meaning that GPUdb will not
return the request until all the matching objects are fully available. The
response payload provides the count of the resulting set. A new resultant
set (view) which satisfies the input NAI restriction specification is
created with the name {@code view_name} passed in as part of the input.
Parameters:
Name
Type
Description
table_name
String
Name of the table to filter. This may be the
name of a collection, a table or a view (when
chaining queries). Collections may be filtered
only if all tables within the collection have
the same type ID.
view_name
String
If provided, then this will be the name of the
view containing the results. Must not be an
already existing collection, table or view.
x_column_name
String
Name of the column containing the x values to
be filtered.
x_vector
Array.<Number>
List of x coordinates of the vertices of the
polygon representing the area to be filtered.
y_column_name
String
Name of the column containing the y values to
be filtered.
y_vector
Array.<Number>
List of y coordinates of the vertices of the
polygon representing the area to be filtered.
Calculates which objects from a table are within a named area of interest
(NAI/polygon). The operation is synchronous meaning that GPUdb will not
return the request until all the matching objects are fully available. The
response payload provides the count of the resulting set. A new resultant
set (view) which satisfies the input NAI restriction specification is
created with the name {@code view_name} passed in as part of the input.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Calculates how many objects within the given table lie in a rectangular box.
The operation is synchronous meaning that GPUdb will not return the request
until all the objects are fully available. The response payload provides the
count of the resulting set. A new resultant set which satisfies the input
NAI restriction specification is also created when a {@code view_name} is
passed in as part of the input payload.
Parameters:
Name
Type
Description
table_name
String
Name of the table on which the bounding box
operation will be performed. Must be a valid
table in GPUdb.
view_name
String
Optional name of the result view that will be
created containing the results of the query. Must
not be an already existing collection, table or
view in GPUdb.
x_column_name
String
Name of the column on which to perform the
bounding box query. If the table's data type
is not a shape type, must be a valid numeric
column.
min_x
Number
Lower bound for the column chosen by {@code
x_column_name}. Must be less than or equal to {@code
max_x}.
max_x
Number
Upper bound for {@code x_column_name}. Must be
greater than or equal to {@code min_x}.
y_column_name
String
Name of a column on which to perform the
bounding box query. If the table's data type
is not a shape type, must be a valid numeric
column.
min_y
Number
Lower bound for {@code y_column_name}. Must be less
than or equal to {@code max_y}.
max_y
Number
Upper bound for {@code y_column_name}. Must be
greater than or equal to {@code min_y}.
Calculates how many objects within the given table lie in a rectangular box.
The operation is synchronous meaning that GPUdb will not return the request
until all the objects are fully available. The response payload provides the
count of the resulting set. A new resultant set which satisfies the input
NAI restriction specification is also created when a {@code view_name} is
passed in as part of the input payload.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Applies a geometry filter against a spatial column named WKT in a given
table, collection or view. The filtering geometry is provided by {@code
input_wkt}.
Parameters:
Name
Type
Description
table_name
String
Name of the table on which the filter by
geometry will be performed. Must be an existing
table, collection or view containing a column
named WKT.
view_name
String
If provided, then this will be the name of the
view containing the results. Must not be an
already existing collection, table or view.
column_name
String
Name of the column to be used in the filter.
Must be 'WKT'
input_wkt
String
A geometry in WKT format that will be used to
filter the objects in {@code table_name}.
operation
String
The geometric filtering operation to perform
Values: contains, crosses, disjoint, equals,
intersects, overlaps, touches, within.
Applies a geometry filter against a spatial column named WKT in a given
table, collection or view. The filtering geometry is provided by {@code
input_wkt}.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Calculates which records from a table have values in the given list for the
corresponding column. The operation is synchronous meaning that GPUdb will
not return a response until all the objects are fully available. The
response payload provides the count of the resulting set. A new resultant
set (view) which satisfies the input filter specification is also created if
a {@code view_name} is passed in as part of the request.
For example, if a type definition has the columns 'x' and 'y', then a filter
by list query with the column map {"x":["10.1", "2.3"], "y":["0.0", "-31.5",
"42.0"]} will return the count of all data points whose x and y values match
one of the values in the respective x- and y-lists. If the filter_mode
option is set to 'not_in_list' then the filter will match all items that are
not in the provided list(s).
Parameters:
Name
Type
Description
table_name
String
Name of the table to filter. This may be the ID
of a collection, table or a result set (for
chaining queries). Collections may be filtered
only if all tables within the collection have
the same type ID.
view_name
String
If provided, then this will be the name of the
view containing the results. Must not be an
already existing collection, table or view.
column_values_map
Object
List of values for the corresponding
column in the table
options
Object
Optional parameters.
filter_mode: String indicating the
filter mode, either 'in_list' or 'not_in_list'.
Values: in_list, not_in_list.
Calculates which records from a table have values in the given list for the
corresponding column. The operation is synchronous meaning that GPUdb will
not return a response until all the objects are fully available. The
response payload provides the count of the resulting set. A new resultant
set (view) which satisfies the input filter specification is also created if
a {@code view_name} is passed in as part of the request.
For example, if a type definition has the columns 'x' and 'y', then a filter
by list query with the column map {"x":["10.1", "2.3"], "y":["0.0", "-31.5",
"42.0"]} will return the count of all data points whose x and y values match
one of the values in the respective x- and y-lists. If the filter_mode
option is set to 'not_in_list' then the filter will match all items that are
not in the provided list(s).
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Calculates which objects from a table lie within a circle with the given
radius and center point (i.e. circular NAI). The operation is synchronous
meaning that GPUdb will not return a response until all the objects are
fully available. The response payload provides the count of the resulting
set. A new resultant set (view) which satisfies the input circular NAI
restriction specification is also created if a {@code view_name} is passed
in as part of the request.
For track data, all track points that lie within the circle plus one point
on either side of the circle (if the track goes beyond the circle) will be
included in the result. For shapes, e.g. polygons, all polygons that
intersect the circle will be included (even if none of the points of the
polygon fall within the circle).
Parameters:
Name
Type
Description
table_name
String
Name of the table on which the filter by radius
operation will be performed. Must be an
existing table in GPUdb.
view_name
String
If provided, then this will be the name of the
view containing the results. Must not be an
already existing collection, table or view.
x_column_name
String
Name of the column to be used for the
x-coordinate (the longitude) of the center.
x_center
Number
Value of the longitude of the center. Must be
within [-180.0, 180.0].
y_column_name
String
Name of the column to be used for the
y-coordinate-the latitude-of the center.
y_center
Number
Value of the latitude of the center. Must be
within [-90.0, 90.0].
radius
Number
The radius of the circle within which the search
will be performed. Must be a non-zero positive
value. It is in meters; so, for example, a value of
'42000' means 42 km.
Calculates which objects from a table lie within a circle with the given
radius and center point (i.e. circular NAI). The operation is synchronous
meaning that GPUdb will not return a response until all the objects are
fully available. The response payload provides the count of the resulting
set. A new resultant set (view) which satisfies the input circular NAI
restriction specification is also created if a {@code view_name} is passed
in as part of the request.
For track data, all track points that lie within the circle plus one point
on either side of the circle (if the track goes beyond the circle) will be
included in the result. For shapes, e.g. polygons, all polygons that
intersect the circle will be included (even if none of the points of the
polygon fall within the circle).
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Calculates which objects from a table have a column that is within the given
bounds. An object from the table identified by {@code table_name} is added
to the view {@code view_name} if its column is within [{@code lower_bound},
{@code upper_bound}] (inclusive). The operation is synchronous. The response
provides a count of the number of objects which passed the bound filter.
For track objects, the count reflects how many points fall within the given
bounds (which may not include all the track points of any given track).
Parameters:
Name
Type
Description
table_name
String
Name of the table on which the filter by range
operation will be performed. Must be a valid
GPUdb table.
view_name
String
If provided, then this will be the name of the
view containing the results. Must not be an
already existing collection, table or view.
column_name
String
Name of a column or an expression of one or
more columns on which the operation would be
applied.
Calculates which objects from a table have a column that is within the given
bounds. An object from the table identified by {@code table_name} is added
to the view {@code view_name} if its column is within [{@code lower_bound},
{@code upper_bound}] (inclusive). The operation is synchronous. The response
provides a count of the number of objects which passed the bound filter.
For track objects, the count reflects how many points fall within the given
bounds (which may not include all the track points of any given track).
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Filters objects matching all points of the given track (works only on track
type data). It allows users to specify a particular track to find all other
points in the table that fall within specified ranges-spatial and
temporal-of all points of the given track. Additionally, the user can
specify another track to see if the two intersect (or go close to each other
within the specified ranges). The user also has the flexibility of using
different metrics for the spatial distance calculation: Euclidean (flat
geometry) or Great Circle (spherical geometry to approximate the Earth's
surface distances). The filtered points are stored in a newly created result
set. The return value of the function is the number of points in the
resultant set (view).
This operation is synchronous meaning that GPUdb will not return a response
until all the objects are fully available.
Parameters:
Name
Type
Description
table_name
String
Name of the table on which the filter by track
operation will be performed. Must be a currently
existing table with track semantic type.
view_name
String
If provided, then this will be the name of the
view containing the results. Must not be an
already existing collection, table or view.
track_id
String
The ID of the track which will act as the
filtering points. Must be an existing track within
the given table.
target_track_ids
Array.<String>
Up to one track ID to intersect with the
"filter" track. If any provided, it must
be an valid track ID within the given
set.
options
Object
Optional parameters.
spatial_radius: A positive number
passed as a string representing the radius of the
search area centered around each track point's
geospatial coordinates. The value is interpreted in
meters. Required parameter.
time_radius: A positive number passed
as a string representing the maximum allowable time
difference between the timestamps of a filtered
object and the given track's points. The value is
interpreted in seconds. Required parameter.
spatial_distance_metric: A string
representing the coordinate system to use for the
spatial search criteria. Acceptable values are
'euclidean' and 'great_circle'. Optional parameter;
default is 'euclidean'. Values: euclidean,
great_circle.
Filters objects matching all points of the given track (works only on track
type data). It allows users to specify a particular track to find all other
points in the table that fall within specified ranges-spatial and
temporal-of all points of the given track. Additionally, the user can
specify another track to see if the two intersect (or go close to each other
within the specified ranges). The user also has the flexibility of using
different metrics for the spatial distance calculation: Euclidean (flat
geometry) or Great Circle (spherical geometry to approximate the Earth's
surface distances). The filtered points are stored in a newly created result
set. The return value of the function is the number of points in the
resultant set (view).
This operation is synchronous meaning that GPUdb will not return a response
until all the objects are fully available.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Calculates which objects from a table, collection, or view match a string
expression for the given string columns. The 'mode' may be:
* search : full text search query with wildcards and boolean operators, e.g.
'(bob* OR sue) AND NOT jane'. Note that for this mode, no column can be
specified in {@code column_names}; GPUdb will search through all string
columns of the table that have text search enabled. Also, the first
character of a search term cannot be a wildcard (* or ?), and search terms
cannot be any of the following: "a", "an", "and", "are", "as", "at", "be",
"but", "by", "for", "if", "in", "into", "is", "it", "no", "not", "of", "on",
"or", "such", "that", "the", "their", "then", "there", "these", "they",
"this", "to", "was", "will", "with".
Search query types:
* Multiple search terms
ex. perfect union - will match any record containing "perfect",
"union", or both.
* Exact phrases
ex. "Perfect Union" - will only match the exact phrase "Perfect
Union"
* Boolean (NOT, AND, OR, parentheses. OR assumed if no operator
specified)
ex. justice AND tranquility - will match only those records
containing both justice and tranquility
* XOR (specified with -)
ex. justice - peace - will match records containing "justice" or
"peace", but not both
* Zero or more char wildcard - (specified with *)
ex, est*is* - will match any records containing a word that
starts with "est" and ends with "sh", such as "establish", "establishable",
and "establishment"
* Exactly one char wildcard - (specified with ?)
ex. est???is* - will only match strings that start with "est",
followed by exactly three letters, followed by "is", followed by one more
letter. This would only match "establish"
* Fuzzy search (term~)
ex. rear~ will match rear,fear,bear,read,etc.
* Proximity - match two words within a specified distance of
eachother
ex. "Union Tranquility"~10 will match any record that has the
words Union and Tranquility within 10 words of eachother
* Range - inclusive [ TO ] and exclusive { TO
}. Note: This is a string search, so numbers will be seen as a
string of numeric characters, not as a number. Ex. 2 > 123
ex. [100 TO 200] will find all strings between 100 and 200
inclusive.
ex. {alpha to beta} will find all strings between alpha and
beta, but not the words alpha or beta
* escaping special characters - Special characters are escaped with
a backslash(\), special characters are: + - && || ! ( ) { } [ ] ^ " ~ * ? :
\
* equals: exact whole-string match (accelerated)
* contains: partial substring match (not accelerated). If the column is a
string type (non-charN) and the number of records is too large, it will
return 0.
* starts_with: strings that start with the given expression (not
accelerated), If the column is a string type (non-charN) and the number of
records is too large, it will return 0.
* regex: full regular expression search (not accelerated). If the column is
a string type (non-charN) and the number of records is too large, it will
return 0.
The options 'case_sensitive' can be used to modify the behavior for all
modes except 'search'
Parameters:
Name
Type
Description
table_name
String
Name of the table on which the filter operation
will be performed. Must be a valid GPUdb table,
collection or view.
view_name
String
If provided, then this will be the name of the
view containing the results. Must not be an
already existing collection, table or view.
expression
String
The expression with which to filter the table.
mode
String
The string filtering mode to apply. See above for
details. Values: search, equals, contains,
starts_with, regex.
column_names
Array.<String>
List of columns on which to apply the
filter. Ignored for 'search' mode.
options
Object
Optional parameters.
case_sensitive: If 'false' then string
filtering will ignore case. Does not apply to
'search' mode. Values: true, false.
Calculates which objects from a table, collection, or view match a string
expression for the given string columns. The 'mode' may be:
* search : full text search query with wildcards and boolean operators, e.g.
'(bob* OR sue) AND NOT jane'. Note that for this mode, no column can be
specified in {@code column_names}; GPUdb will search through all string
columns of the table that have text search enabled. Also, the first
character of a search term cannot be a wildcard (* or ?), and search terms
cannot be any of the following: "a", "an", "and", "are", "as", "at", "be",
"but", "by", "for", "if", "in", "into", "is", "it", "no", "not", "of", "on",
"or", "such", "that", "the", "their", "then", "there", "these", "they",
"this", "to", "was", "will", "with".
Search query types:
* Multiple search terms
ex. perfect union - will match any record containing "perfect",
"union", or both.
* Exact phrases
ex. "Perfect Union" - will only match the exact phrase "Perfect
Union"
* Boolean (NOT, AND, OR, parentheses. OR assumed if no operator
specified)
ex. justice AND tranquility - will match only those records
containing both justice and tranquility
* XOR (specified with -)
ex. justice - peace - will match records containing "justice" or
"peace", but not both
* Zero or more char wildcard - (specified with *)
ex, est*is* - will match any records containing a word that
starts with "est" and ends with "sh", such as "establish", "establishable",
and "establishment"
* Exactly one char wildcard - (specified with ?)
ex. est???is* - will only match strings that start with "est",
followed by exactly three letters, followed by "is", followed by one more
letter. This would only match "establish"
* Fuzzy search (term~)
ex. rear~ will match rear,fear,bear,read,etc.
* Proximity - match two words within a specified distance of
eachother
ex. "Union Tranquility"~10 will match any record that has the
words Union and Tranquility within 10 words of eachother
* Range - inclusive [ TO ] and exclusive { TO
}. Note: This is a string search, so numbers will be seen as a
string of numeric characters, not as a number. Ex. 2 > 123
ex. [100 TO 200] will find all strings between 100 and 200
inclusive.
ex. {alpha to beta} will find all strings between alpha and
beta, but not the words alpha or beta
* escaping special characters - Special characters are escaped with
a backslash(\), special characters are: + - && || ! ( ) { } [ ] ^ " ~ * ? :
\
* equals: exact whole-string match (accelerated)
* contains: partial substring match (not accelerated). If the column is a
string type (non-charN) and the number of records is too large, it will
return 0.
* starts_with: strings that start with the given expression (not
accelerated), If the column is a string type (non-charN) and the number of
records is too large, it will return 0.
* regex: full regular expression search (not accelerated). If the column is
a string type (non-charN) and the number of records is too large, it will
return 0.
The options 'case_sensitive' can be used to modify the behavior for all
modes except 'search'
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Filters objects in one table based on objects in another table. The user
must specify matching column types from the two tables (i.e. the target
table from which objects will be filtered and the source table based on
which the filter will be created); the column names need not be the same. If
a {@code view_name} is specified, then the filtered objects will then be put
in a newly created view. The operation is synchronous, meaning that GPUdb
will not return until all objects are fully available in the result view.
The return value contains the count (i.e. the size) of the resulting view.
Parameters:
Name
Type
Description
table_name
String
Name of the table whose data will be filtered.
Must be an existing table in GPUdb.
view_name
String
If provided, then this will be the name of the
view containing the results. Must not be an
already existing collection, table or view.
column_name
String
Name of the column by whose value the data will
be filtered from the table designated by {@code
table_name}.
source_table_name
String
Name of the table whose data will be
compared against in the table called
{@code table_name}. Must be an existing
table in GPUdb.
source_table_column_name
String
Name of the column in the {@code
source_table_name} whose values
will be used as the filter for
table {@code table_name}. Must
match the type of the {@code
column_name}.
Filters objects in one table based on objects in another table. The user
must specify matching column types from the two tables (i.e. the target
table from which objects will be filtered and the source table based on
which the filter will be created); the column names need not be the same. If
a {@code view_name} is specified, then the filtered objects will then be put
in a newly created view. The operation is synchronous, meaning that GPUdb
will not return until all objects are fully available in the result view.
The return value contains the count (i.e. the size) of the resulting view.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Calculates which objects from a table has a particular value for a
particular column. The input parameters provide a way to specify either a
String or a Double valued column and a desired value for the column on which
the filter is performed. The operation is synchronous meaning that GPUdb
will not return a response until all the objects are fully available. The
response payload provides the count of the resulting set. A new result view
which satisfies the input filter restriction specification is also created
with a view name passed in as part of the input payload.
Parameters:
Name
Type
Description
table_name
String
Name of an existing GPUdb table on which to
perform the calculation.
view_name
String
If provided, then this will be the name of the
view containing the results. Must not be an
already existing collection, table or view.
is_string
Boolean
Indicates whether the value being searched for
is string or numeric.
value
Number
The value to search for.
value_str
String
The string value to search for.
column_name
String
Name of a column or an expression of one or
more columns on which the filter by value would
be applied.
Calculates which objects from a table has a particular value for a
particular column. The input parameters provide a way to specify either a
String or a Double valued column and a desired value for the column on which
the filter is performed. The operation is synchronous meaning that GPUdb
will not return a response until all the objects are fully available. The
response payload provides the count of the resulting set. A new result view
which satisfies the input filter restriction specification is also created
with a view name passed in as part of the input payload.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Retrieves records from a given table, optionally filtered by an expression
and/or sorted by a column. This operation can only be performed on tables or
on homogeneous collection (collections whose children all have the same
type). Records can be returned encoded as binary or json.
This operation supports paging through the data via the {@code offset} and
{@code limit} parameters. Note that when paging through a table, if the
table (or the underlying table in case of a view) is updated (records are
inserted, deleted or modified) the records retrieved may differ between
calls based on the updates applied.
Note that when using the Java API, it is not possible to retrieve records
from join tables using this operation.
Parameters:
Name
Type
Description
table_name
String
Name of the table from which the records will be
fetched. Must be a table, view or homogeneous
collection.
offset
Number
A positive integer indicating the number of initial
results to skip (this can be useful for paging
through the results).
limit
Number
A positive integer indicating the maximum number of
results to be returned. Or END_OF_SET (-9999) to
indicate that the max number of results should be
returned.
options
Object
expression: Optional filter expression
to apply to the table.
sort_by: Optional column that the data
should be sorted by. Empty by default (i.e. no
sorting is applied).
sort_order: String indicating how the
returned values should be sorted - ascending or
descending. Ignored if 'sort_by' option is not
specified. Values: ascending, descending.
For a given table, retrieves the values of the given columns within a given
range. It returns maps of column name to the vector of values for each
supported data type (double, float, long, int and string). This operation
supports pagination feature, i.e. values that are retrieved are those
associated with the indices between the start (offset) and end value (offset
+ limit) parameters (inclusive). If there are num_points values in the table
then each of the indices between 0 and num_points-1 retrieves a unique
value.
Note that when using the pagination feature, if the table (or the underlying
table in case of a view) is updated (records are inserted, deleted or
modified) the records or values retrieved may differ between calls
(discontiguous or overlap) based on the type of the update.
Name of the table on which this operation will
be performed. The table cannot be a parent set.
column_names
Array.<String>
The list of column values to retrieve.
Columns annotated as store only cannot be
retrieved.
offset
Number
A positive integer indicating the number of initial
results to skip (this can be useful for paging
through the results).
limit
Number
A positive integer indicating the maximum number of
results to be returned (if not provided the default
is 10000). Or END_OF_column (-9999) to indicate that
the max number of results should be returned.
options
Object
expression: Optional filter expression
to apply to the table.
sort_by: Optional column that the data
should be sorted by. Empty by default (i.e. no
sorting is applied).
sort_order: String indicating how the
returned values should be sorted - ascending or
descending. Default is 'ascending'. Ignored if
'sort_by' option is not specified. Values:
ascending, descending.
For a given table, retrieves the values of the given columns within a given
range. It returns maps of column name to the vector of values for each
supported data type (double, float, long, int and string). This operation
supports pagination feature, i.e. values that are retrieved are those
associated with the indices between the start (offset) and end value (offset
+ limit) parameters (inclusive). If there are num_points values in the table
then each of the indices between 0 and num_points-1 retrieves a unique
value.
Note that when using the pagination feature, if the table (or the underlying
table in case of a view) is updated (records are inserted, deleted or
modified) the records or values retrieved may differ between calls
(discontiguous or overlap) based on the type of the update.
Retrieves the complete series/track records from the given {@code
world_table_name} based on the partial track information contained in the
{@code table_name}.
This operation supports paging through the data via the {@code offset} and
{@code limit} parameters.
In contrast to /get/records this returns records grouped by series/track. So
if {@code offset} is 0 and {@code limit} is 5 this operation would return
the first 5 series/tracks in {@code table_name}. Each series/track will be
returned sorted by their TIMESTAMP column.
Parameters:
Name
Type
Description
table_name
String
Name of the collection/table/view for which
series/tracks will be fetched.
world_table_name
String
Name of the table containing the complete
series/track information to be returned
for the tracks present in the {@code
table_name}. Typically this is used when
retrieving series/tracks from a view
(which contains partial series/tracks) but
the user wants to retrieve the entire
original series/tracks. Can be blank.
offset
Number
A positive integer indicating the number of initial
series/tracks to skip (useful for paging through the
results).
limit
Number
A positive integer indicating the maximum number of
series/tracks to be returned. Or END_OF_SET (-9999)
to indicate that the max number of results should be
returned.
Retrieves the complete series/track records from the given {@code
world_table_name} based on the partial track information contained in the
{@code table_name}.
This operation supports paging through the data via the {@code offset} and
{@code limit} parameters.
In contrast to /get/records this returns records grouped by series/track. So
if {@code offset} is 0 and {@code limit} is 5 this operation would return
the first 5 series/tracks in {@code table_name}. Each series/track will be
returned sorted by their TIMESTAMP column.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Retrieves records from a collection. The operation can optionally return the
record IDs which can be used in certain queries such as /delete/records.
This operation supports paging through the data via the {@code offset} and
{@code limit} parameters.
Note that when using the Java API, it is not possible to retrieve records
from join tables using this operation.
Parameters:
Name
Type
Description
table_name
String
Name of the collection or table from which
records are to be retrieved. Must be an existing
GPUdb collection or table.
offset
Number
A positive integer indicating the number of initial
results to skip (this can be useful for paging
through the results).
limit
Number
A positive integer indicating the maximum number of
results to be returned, or END_OF_SET (-9999) to
indicate that the max number of results should be
returned.
options
Object
return_record_ids: If 'true' then
return GPUdb's internal record id along with each
returned record. Default is 'false'. Values: true,
false.
Response object containing the method_codes of the
operation.
Type
Object
get_records_request(request, callback) → {Object}
Retrieves records from a given table, optionally filtered by an expression
and/or sorted by a column. This operation can only be performed on tables or
on homogeneous collection (collections whose children all have the same
type). Records can be returned encoded as binary or json.
This operation supports paging through the data via the {@code offset} and
{@code limit} parameters. Note that when paging through a table, if the
table (or the underlying table in case of a view) is updated (records are
inserted, deleted or modified) the records retrieved may differ between
calls based on the updates applied.
Note that when using the Java API, it is not possible to retrieve records
from join tables using this operation.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Grants a table-level permission to a user or role.
Parameters:
Name
Type
Description
name
String
Name of the user or role to which the permission will
be granted. Must be an existing user or role.
permission
String
Permission to grant to the user or role. Values:
table_admin, table_insert, table_update,
table_delete, table_read.
table_name
String
Name of the table to which the permission grants
access. Must be an existing table, collection,
or view. If a collection, the permission also
applies to tables and views in the collection.
Adds multiple records to the specified table. The operation is synchronous
meaning that GPUdb will not return a response until all the records are
fully inserted and available. The response payload provides unique
identifier for each added record along with counts of the number of records
actually inserted and/or updated.
{@code options} can be used to customize this function's behavior. The only
parameter available is {@code update_on_existing_pk}. The value can be
either 'true' or 'false'. If the table has a /create/type and if {@code
update_on_existing_pk} is 'true' then if any of the records being added have
the same primary key as existing records, the existing records are replaced
(i.e. *updated*) with the given records. If {@code update_on_existing_pk} is
false and if the records being added have the same primary key as existing
records, the given records with existing primary keys are ignored (the
existing records are left unchanged). It is quite possible that in this case
some of the given records will be inserted and some (those having existing
primary keys) will be ignored (or updated). If the specified table does not
have a primary key column then the {@code update_on_existing_pk} option is
ignored.
Parameters:
Name
Type
Description
table_name
String
Table to which the records are to be added. Must
be an existing table.
data
Array.<Object>
An array of JSON encoded data for the records to be
added. All records must be of the same type as that
of the table. Empty array if {@code list_encoding}
is {@code binary}.
options
Object
Optional parameters.
update_on_existing_pk: If the table
has a /create/type, then if the value is 'true'
then if any of the records being added have the
same primary key as existing records, the existing
records are replaced (i.e. *updated*) with the
given records. If 'false' and if the records being
added have the same primary key as existing
records, the given records with existing primary
keys are ignored (the existing records are left
unchanged). It is quite possible that in this case
some of the given records will be inserted and some
(those having existing primary keys) will be
ignored (or updated). If the specified table does
not have a primary key column then this optional
parameter is ignored. Values: true, false.
return_record_ids: If 'true' then
return GPUdb's internal record id along for each
inserted record. Default is 'false'. Values: true,
false.
route_to_address: Route to a specific
rank/tom. Option not suitable for tables using
primary/shard keys
Generates a specified number of random records and adds them to the given
table. There is an optional parameter that allows the user to customize the
ranges of the column values. It also allows the user to specify linear
profiles for some or all columns in which case linear values are generated
rather than random ones. Only individual tables are supported for this
operation.
This operation is synchronous, meaning that GPUdb will not return until all
random records are fully available.
Parameters:
Name
Type
Description
table_name
String
Table to which random records will be added.
Must be an existing table. Also, must be an
individual table, not a collection of tables,
nor a view of a table.
count
Number
Number of records to generate.
options
Object
Optional parameter to pass in specifications for
the randomness of the values. This map is
different from the *options* parameter of most
other endpoints in that it is a map of string to
map of string to doubles, while most others are
maps of string to string. In this map, the top
level keys represent which column's parameters are
being specified, while the internal keys represents
which parameter is being specified. The parameters
that can be specified are: *min*, *max*, and
*interval*. These parameters take on different
meanings depending on the type of the column.
Below follows a more detailed description of the
map:
all: This key indicates that the
specifications relayed in the internal map are to
be applied to all columns of the records.
min: For numerical columns, the
minimum of the generated values is set to this
value. Default is -99999. For point, shape, and
track semantic types, min for numeric 'x' and 'y'
columns needs to be within [-180, 180] and [-90,
90], respectively. The default minimum possible
values for these columns in such cases are -180.0
and -90.0. For the 'TIMESTAMP' column, the default
minimum corresponds to Jan 1, 2010.
For string columns, the minimum length of the
randomly generated strings is set to this value
(default is 1). If both minimum and maximum are
provided, minimum must be less than or equal to
max. Value needs to be within [1, 200].
If the min is outside the accepted ranges for
strings columns and 'x' and 'y' columns for
point/shape/track types, then those parameters will
not be set; however, GPUdb will not throw an error
in such a case. It is the responsibility of the
user to use the {@code all} parameter judiciously.
max: For numerical columns, the
maximum of the generated values is set to this
value. Default is 99999. For point, shape, and
track semantic types, max for numeric 'x' and 'y'
columns needs to be within [-180, 180] and [-90,
90], respectively. The default minimum possible
values for these columns in such cases are 180.0
and 90.0.
For string columns, the maximum length of the
randomly generated strings is set to this value
(default is 200). If both minimum and maximum are
provided, *max* must be greater than or equal to
*min*. Value needs to be within [1, 200].
If the *max* is outside the accepted ranges for
strings columns and 'x' and 'y' columns for
point/shape/track types, then those parameters will
not be set; however, GPUdb will not throw an error
in such a case. It is the responsibility of the
user to use the {@code all} parameter judiciously.
interval: If specified, then generate
values for all columns linearly and evenly spaced
with the given interval value starting at the
minimum value (instead of generating random data).
*Any provided max value is disregarded.* For
string-type columns, the interval value is ignored
but the string values would be generated following
the pattern: 'attrname_creationIndex#', i.e. the
column name suffixed with an underscore and a
running counter (starting at 0).
attr_name: Set the following
parameters for the column specified by the key.
This overrides any parameter set by {@code all}.
min: For numerical columns, the
minimum of the generated values is set to this
value. Default is -99999. For point, shape, and
track semantic types, min for numeric 'x' and 'y'
columns needs to be within [-180, 180] and [-90,
90], respectively. The default minimum possible
values for these columns in such cases are -180.0
and -90.0. For the 'TIMESTAMP' column, the default
minimum corresponds to Jan 1, 2010.
For string columns, the minimum length of the
randomly generated strings is set to this value
(default is 1). If both minimum and maximum are
provided, minimum must be less than or equal to
max. Value needs to be within [1, 200].
If the min is outside the accepted ranges for
strings columns and 'x' and 'y' columns for
point/shape/track types, then those parameters will
not be set; however, GPUdb will not throw an error
in such a case. It is the responsibility of the
user to use the {@code all} parameter judiciously.
max: For numerical columns, the
maximum of the generated values is set to this
value. Default is 99999. For point, shape, and
track semantic types, max for numeric 'x' and 'y'
columns needs to be within [-180, 180] and [-90,
90], respectively. The default minimum possible
values for these columns in such cases are 180.0
and 90.0.
For string columns, the maximum length of the
randomly generated strings is set to this value
(default is 200). If both minimum and maximum are
provided, *max* must be greater than or equal to
*min*. Value needs to be within [1, 200].
If the *max* is outside the accepted ranges for
strings columns and 'x' and 'y' columns for
point/shape/track types, then those parameters will
not be set; however, GPUdb will not throw an error
in such a case. It is the responsibility of the
user to use the {@code all} parameter judiciously.
interval: If specified, then generate
values for all columns linearly and evenly spaced
with the given interval value starting at the
minimum value (instead of generating random data).
*Any provided max value is disregarded.* For
string-type columns, the interval value is ignored
but the string values would be generated following
the pattern: 'attrname_creationIndex#', i.e. the
column name suffixed with an underscore and a
running counter (starting at 0).
track_length: This key-map pair is
only valid for track type data sets (GPUdb throws
an error otherwise).
min: Minimum possible length for
generated series; default is 100 records per
series. Must be an integral value within the range
[1, 500]. If both min and max are specified, min
must be less than or equal to max.
max: Maximum possible length for
generated series; default is 500 records per
series. Must be an integral value within the range
[1, 500]. If both min and max are specified, max
must be greater than or equal to min.
Generates a specified number of random records and adds them to the given
table. There is an optional parameter that allows the user to customize the
ranges of the column values. It also allows the user to specify linear
profiles for some or all columns in which case linear values are generated
rather than random ones. Only individual tables are supported for this
operation.
This operation is synchronous, meaning that GPUdb will not return until all
random records are fully available.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Adds multiple records to the specified table. The operation is synchronous
meaning that GPUdb will not return a response until all the records are
fully inserted and available. The response payload provides unique
identifier for each added record along with counts of the number of records
actually inserted and/or updated.
{@code options} can be used to customize this function's behavior. The only
parameter available is {@code update_on_existing_pk}. The value can be
either 'true' or 'false'. If the table has a /create/type and if {@code
update_on_existing_pk} is 'true' then if any of the records being added have
the same primary key as existing records, the existing records are replaced
(i.e. *updated*) with the given records. If {@code update_on_existing_pk} is
false and if the records being added have the same primary key as existing
records, the given records with existing primary keys are ignored (the
existing records are left unchanged). It is quite possible that in this case
some of the given records will be inserted and some (those having existing
primary keys) will be ignored (or updated). If the specified table does not
have a primary key column then the {@code update_on_existing_pk} option is
ignored.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Adds a symbol or icon (i.e. an image) to represent data points when data is
rendered visually. Users must provide the symbol identifier (string), a
format (currently supported: 'svg' and 'svg_path'), the data for the symbol,
and any additional optional parameter (e.g. color). To have a symbol used
for rendering create a table with a string column named 'SYMBOLCODE' (along
with 'x' or 'y' for example). Then when the table is rendered (via WMS or /visualize/image) if
the 'dosymbology' parameter is 'true' then GPUdb uses the value of the
'SYMBOLCODE' column to pick the symbol displayed for each point.
Parameters:
Name
Type
Description
symbol_id
String
The id of the symbol being added. This is the
same id that should be in the 'SYMBOLCODE' column
for objects using this symbol
symbol_format
String
Specifies the symbol format. Must be either
'svg' or 'svg_path'. Values: svg, svg_path.
symbol_data
String
The actual symbol data. If {@code
symbol_format} is 'svg' then this should be the
raw bytes representing an svg file. If {@code
symbol_format} is svg path then this should be
an svg path string, for example:
'M25.979,12.896,5.979,12.896,5.979,19.562,25.979,19.562z'
options
Object
Optional parameters.
color: If {@code symbol_format} is
'svg' this is ignored. If {@code symbol_format} is
'svg_path' then this option specifies the color (in
RRGGBB hex format) of the path. For example, to
have the path rendered in red, used 'FF0000'. If
'color' is not provided then '00FF00' (i.e. green)
is used by default.
Adds a symbol or icon (i.e. an image) to represent data points when data is
rendered visually. Users must provide the symbol identifier (string), a
format (currently supported: 'svg' and 'svg_path'), the data for the symbol,
and any additional optional parameter (e.g. color). To have a symbol used
for rendering create a table with a string column named 'SYMBOLCODE' (along
with 'x' or 'y' for example). Then when the table is rendered (via WMS or /visualize/image) if
the 'dosymbology' parameter is 'true' then GPUdb uses the value of the
'SYMBOLCODE' column to pick the symbol displayed for each point.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Manages global access to a table's data. By default a table has a {@code
lock_type} of {@code unlock}, indicating all operations are permitted. A
user may request a {@code read-only} or a {@code write-only} lock, after
which only read or write operations, respectively, are permitted on the
table until the lock is removed. When {@code lock_type} is {@code disable}
then no operations are permitted on the table. The lock status can be
queried by setting {@code lock_type} to {@code status}.
Parameters:
Name
Type
Description
table_name
String
Name of the table to be locked. It must be a
currently existing table, collection, or view.
lock_type
String
The type of lock being applied to the table.
Setting it to {@code status} will return the
current lock status of the table without changing
it. Values: status, disable, read-only,
write-only, unlock.
Response object containing the method_codes of the
operation.
Type
Object
lock_table_request(request, callback) → {Object}
Manages global access to a table's data. By default a table has a {@code
lock_type} of {@code unlock}, indicating all operations are permitted. A
user may request a {@code read-only} or a {@code write-only} lock, after
which only read or write operations, respectively, are permitted on the
table until the lock is removed. When {@code lock_type} is {@code disable}
then no operations are permitted on the table. The lock status can be
queried by setting {@code lock_type} to {@code status}.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Shows security information relating to users and/or roles. If the caller is
not a system administrator, only information relating to the caller and
their roles is returned.
Parameters:
Name
Type
Description
names
Array.<String>
A list of names of users and/or roles about which
security information is requested. If none are
provided, information about all users and roles
will be returned.
Shows security information relating to users and/or roles. If the caller is
not a system administrator, only information relating to the caller and
their roles is returned.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Returns server configuration and version related information to the caller.
The GPUdb Admin tool uses it to present server related information to the
user.
Parameters:
Name
Type
Description
options
Object
Optional parameters.
properties: A list of comma separated
names of properties requested. If not specified,
all properties will be returned.
Returns server configuration and version related information to the caller.
The GPUdb Admin tool uses it to present server related information to the
user.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Response object containing the method_codes of the
operation.
Type
Object
show_system_timing(options, callback) → {Object}
Returns the last 100 requests made to GPUdb along with the request timing
and internal job id. The GPUdb Admin tool uses it to present request timing
information to the user.
Returns the last 100 requests made to GPUdb along with the request timing
and internal job id. The GPUdb Admin tool uses it to present request timing
information to the user.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Retrieves detailed information about a particular GPUdb table, specified in
{@code table_name}. If the supplied {@code 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 {@code 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 {@code sizes} and {@code
full_sizes}), along with the total number of objects in the requested table
(in {@code total_size} and {@code 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 {@code table_name} empty
will return an error.
If the requested table is blank, then information is returned about all
top-level tables including collections.
Parameters:
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
Object
Optional parameters.
get_sizes: If 'true' then the table
sizes will be returned; otherwise they will be
returned blank. Values: true, false.
show_children: If {@code 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 {@code table_name} is a child
table, 'show_children' must be 'false'. If {@code
table_name} is empty then 'show_children' must be
'true'. Values: true, false.
Response object containing the method_codes of the
operation.
Type
Object
show_table_request(request, callback) → {Object}
Retrieves detailed information about a particular GPUdb table, specified in
{@code table_name}. If the supplied {@code 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 {@code 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 {@code sizes} and {@code
full_sizes}), along with the total number of objects in the requested table
(in {@code total_size} and {@code 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 {@code table_name} empty
will return an error.
If the requested table is blank, then information is returned about all
top-level tables including collections.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Gets names of the tables from GPUdb based on the type information. Each
table in GPUdb has a particular type. This type is made out of the type
label, schema of the table and the semantic type of the table. This function
allows a look up of the existing tables based on full or partial type
information. The operation is synchronous.
Parameters:
Name
Type
Description
type_id
String
Type id returned by a call to /create/type.
label
String
Optional user supplied label which can be used
instead of the type_id to retrieve all tables with
the given label.
Gets names of the tables from GPUdb based on the type information. Each
table in GPUdb has a particular type. This type is made out of the type
label, schema of the table and the semantic type of the table. This function
allows a look up of the existing tables based on full or partial type
information. The operation is synchronous.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Retrieves information for the specified data type. Given a type ID, GPUdb
returns the data type schema, the label, and the semantic type along with
the type ID. If the user provides any combination of label and semantic
type, then GPUdb returns the pertinent information for all data types that
match the input criteria.
Parameters:
Name
Type
Description
type_id
String
Type Id returned in response to a call to
/create/type.
label
String
Option string that was supplied by user in a call to
/create/type.
Response object containing the method_codes of the
operation.
Type
Object
show_types_request(request, callback) → {Object}
Retrieves information for the specified data type. Given a type ID, GPUdb
returns the data type schema, the label, and the semantic type along with
the type ID. If the user provides any combination of label and semantic
type, then GPUdb returns the pertinent information for all data types that
match the input criteria.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
If a callback function is provided, the request will be submitted
asynchronously, and the result (either a response or an error) will be passed
to the callback function upon completion.
If a callback function is not provided, the request will be submitted
synchronously and the response returned directly, and an exception will be
thrown if an error occurs.
Runs multiple predicate-based updates in a single call. With the list of
given expressions, any matching record's column values will be updated as
provided in {@code new_values_maps}. There is also an optional 'upsert'
capability where if a particular predicate doesn't match any existing
record, then a new record can be inserted.
Note that this operation can only be run on an original table and not on a
collection or a result view.
This operation can update primary key values. By default only 'pure primary
key' predicates are allowed when updating primary key values. If the primary
key for a table is the column 'attr1', then the operation will only accept
predicates of the form: "attr1 == 'foo'" if the attr1 column is being
updated. For a composite primary key (e.g. columns 'attr1' and 'attr2')
then this operation will only accept predicates of the form: "(attr1 ==
'foo') and (attr2 == 'bar')". Meaning, all primary key columns must appear
in an equality predicate in the expressions. Furthermore each 'pure primary
key' predicate must be unique within a given request. These restrictions
can be removed by utilizing some available options through {@code options}.
Parameters:
Name
Type
Description
table_name
String
Table to be updated. Must be a currently
existing table and not a collection or view.
expressions
Array.<String>
A list of the actual predicates, one for each
update; format should follow the guidelines
/filter.
new_values_maps
Array.<Object>
List of new values for the matching
records. Each element is a map with
(key, value) pairs where the keys are the
names of the columns whose values are to
be updated; the values are the new
values. The number of elements in the
list should match the length of {@code
expressions}.
data
Array.<Object>
An optional list of new json-avro encoded objects to
insert, one for each update, to be added to the set
if the particular update did not affect any objects.
options
Object
Optional parameters.
global_expression: An optional global
expression to reduce the search space of the
predicates listed in {@code expressions}.
bypass_safety_checks: When set to
'true', all predicates are available for primary
key updates. Keep in mind that it is possible to
destroy data in this case, since a single predicate
may match multiple objects (potentially all of
records of a table), and then updating all of those
records to have the same primary key will, due to
the primary key uniqueness constraints, effectively
delete all but one of those updated records.
Values: true, false.
update_on_existing_pk: Can be used to
customize behavior when the updated primary key
value already exists, as described in
/insert/records. Values: true, false.
record_id: ID of a single record to be
updated (returned in the call to /insert/records or
/get/records/fromcollection).
Updates the view specified by {@code table_name} to include full series
(track) information from the {@code world_table_name} for the series
(tracks) present in the {@code view_name}.
Parameters:
Name
Type
Description
table_name
String
Name of the view on which the update operation
will be performed. Must be a valid view in
GPUdb.
world_table_name
String
Name of the table containing the complete
series (track) information.
view_name
String
Optional name of the view containing the series
(tracks) which have to be updated.
Updates the view specified by {@code table_name} to include full series
(track) information from the {@code world_table_name} for the series
(tracks) present in the {@code view_name}.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Runs multiple predicate-based updates in a single call. With the list of
given expressions, any matching record's column values will be updated as
provided in {@code new_values_maps}. There is also an optional 'upsert'
capability where if a particular predicate doesn't match any existing
record, then a new record can be inserted.
Note that this operation can only be run on an original table and not on a
collection or a result view.
This operation can update primary key values. By default only 'pure primary
key' predicates are allowed when updating primary key values. If the primary
key for a table is the column 'attr1', then the operation will only accept
predicates of the form: "attr1 == 'foo'" if the attr1 column is being
updated. For a composite primary key (e.g. columns 'attr1' and 'attr2')
then this operation will only accept predicates of the form: "(attr1 ==
'foo') and (attr2 == 'bar')". Meaning, all primary key columns must appear
in an equality predicate in the expressions. Furthermore each 'pure primary
key' predicate must be unique within a given request. These restrictions
can be removed by utilizing some available options through {@code options}.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.
Creates raster images of data in the given table based on provided input
parameters. Numerous parameters are required to call this function. Some of
the important parameters are the attributes of the generated images ({@code
bg_color}, {@code width}, {@code height}), the collection of GPUdb table
names on which this function is to be applied, for which shapes (point,
polygon, tracks) the images are to be created and a user specified session
key. This session key is later used to fetch the generated images stored by
GPUdb. The operation is synchronous meaning that GPUdb will not return the
request until the images for all the frames of the video are fully
available.
Once the request has been processed then the generated video frames are
available for download via WMS using STYLES=cached. In this request the
LAYERS parameter should be populated with the session key passed in {@code
session_key} of the visualize video request and the FRAME parameter
indicates which 0-based frame of the video should be returned. All other WMS
parameters are ignored for this mode.
For instance, if a 20 frame video with the session key 'MY-SESSION-KEY' was
generated, the first frame could be retrieved with the URL::
http://gpudb-ip-address:9191/wms?REQUEST=GetMap&STYLES=cached&LAYERS=MY-SESSION-KEY&FRAME=19
The response payload provides, among other things, the number of frames
which were created by GPUdb.
Parameters:
Name
Type
Description
table_names
Array.<String>
Names of the tables containing the data for
various layers of the resulting video.
world_table_names
Array.<String>
Optional name of the tables containing
the data for the entire track when the
{@code table_names} contains only part
of the track data, but the entire track
has to be rendered. The number of
tables should match the number of
tables in the {@code table_names}
track_ids
Array.<Array.<String>>
Tracks from the {@code table_names} to be
rendered.
Creates raster images of data in the given table based on provided input
parameters. Numerous parameters are required to call this function. Some of
the important parameters are the attributes of the generated images ({@code
bg_color}, {@code width}, {@code height}), the collection of GPUdb table
names on which this function is to be applied, for which shapes (point,
polygon, tracks) the images are to be created and a user specified session
key. This session key is later used to fetch the generated images stored by
GPUdb. The operation is synchronous meaning that GPUdb will not return the
request until the images for all the frames of the video are fully
available.
Once the request has been processed then the generated video frames are
available for download via WMS using STYLES=cached. In this request the
LAYERS parameter should be populated with the session key passed in {@code
session_key} of the visualize video request and the FRAME parameter
indicates which 0-based frame of the video should be returned. All other WMS
parameters are ignored for this mode.
For instance, if a 20 frame video with the session key 'MY-SESSION-KEY' was
generated, the first frame could be retrieved with the URL::
http://gpudb-ip-address:9191/wms?REQUEST=GetMap&STYLES=cached&LAYERS=MY-SESSION-KEY&FRAME=19
The response payload provides, among other things, the number of frames
which were created by GPUdb.
Parameters:
Name
Type
Description
request
Object
Request object containing the parameters for the
operation.