Class: GPUdb

GPUdb

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 | Array.<String> The URL of the GPUdb server (e.g., http://hostname:9191). May also be specified as a list of urls; all urls in the list must be well formed.
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.
Source:

Classes

Type

Members

(readonly) api_version :String

The version number of the GPUdb JavaScript API.
Type:
  • String
Source:

(readonly) END_OF_SET :Number

Constant used with certain requests to indicate that the maximum allowed number of results should be returned.
Type:
  • Number
Source:

(readonly) hostname :String

The hostname of the current GPUdb server.
Type:
  • String
Source:

(readonly) parsedUrls :Array.<ConnectionToken>

The URLs of the GPUdb servers.
Type:
  • Array.<ConnectionToken>
Source:

(readonly) password :String

The password used for authentication to GPUdb. Will be an empty string if none was provided to the GPUdb constructor.
Type:
  • String
Source:

(readonly) pathname :String

The pathname of the current GPUdb server.
Type:
  • String
Source:

(readonly) port :String

The port of the current GPUdb server.
Type:
  • String
Source:

(readonly) protocol :String

The protocol of the current GPUdb server address.
Type:
  • String
Source:

(readonly) timeout :Number

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.
Type:
  • Number
Source:

(readonly) url :String

The URL of the current GPUdb server.
Type:
  • String
Source:

(readonly) username :String

The username used for authentication to GPUdb. Will be an empty string if none was provided to the GPUdb contructor.
Type:
  • String
Source:

Methods

(static) decode(o) → {Object|Array.<Object>}

Decodes a JSON string, or array of JSON strings, returned from GPUdb into JSON object(s).
Parameters:
Name Type Description
o String | Array.<String> The JSON string(s) to decode.
Source:
Returns:
The decoded JSON object(s).
Type
Object | Array.<Object>

(static) encode(o) → {String|Array.<String>}

Encodes a JSON object, or array of JSON objects, into JSON string(s) to be passed to GPUdb.
Parameters:
Name Type Description
o Object | Array.<Object> The JSON object(s) to encode.
Source:
Returns:
The encoded JSON string(s).
Type
String | Array.<String>

admin_offline(offline, options, callback) → {Promise}

Take the system offline. When the system is offline, no user operations can be performed with the exception of a system shutdown.
Parameters:
Name Type Description
offline Boolean Set to true if desired state is offline. Supported values:
  • 'true'
  • 'false'
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

admin_offline_request(request, callback) → {Promise}

Take the system offline. When the system is offline, no user operations can be performed with the exception of a system shutdown.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

admin_shutdown(exit_type, authorization, options, callback) → {Promise}

Exits the database server application.
Parameters:
Name Type Description
exit_type String Reserved for future use. User can pass an empty string.
authorization String No longer used. User can pass an empty string.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

admin_shutdown_request(request, callback) → {Promise}

Exits the database server application.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

admin_verify_db(options, callback) → {Promise}

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
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

admin_verify_db_request(request, callback) → {Promise}

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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

aggregate_convex_hull(table_name, x_column_name, y_column_name, options, callback) → {Promise}

Calculates and returns the convex hull for the values in a table specified by table_name.
Parameters:
Name Type Description
table_name String Name of Table on which the operation will be performed. Must be an existing table. It can not be a collection.
x_column_name String Name of the column containing the x coordinates of the points for the operation being performed.
y_column_name String Name of the column containing the y coordinates of the points for the operation being performed.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

aggregate_convex_hull_request(request, callback) → {Promise}

Calculates and returns the convex hull for the values in a table specified by table_name.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

aggregate_group_by(table_name, column_names, offset, limit, options, callback) → {Promise}

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, and all column types except unrestricted-length strings may be used for computing applicable aggregates.

The results can be paged via the offset and 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"}.

options can be used to customize behavior of this call e.g. filtering or sorting the results.

To group by columns '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 a result_table name is specified in the options, the results are stored in a new table with that name. No results are returned in the response. If the source table's shard key is used as the grouping column(s), the result table will be sharded, in all other cases it will be replicated. Sorting will properly function only if the result table is replicated or if there is only one processing node and should not be relied upon in other cases.

Parameters:
Name Type Description
table_name String Name of the table on which the operation will be performed. Must be an existing table/view/collection.
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.
  • 'collection_name': Name of a collection which is to contain the table specified in result_table, otherwise the table will be a top-level table. If the collection does not allow duplicate types and it contains a table of the same type as the given one, then this table creation request will fail. Additionally this option is invalid if table_name is a collection.
  • '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. Supported values:
    • 'ascending': Indicates that the returned values should be sorted in ascending order.
    • 'descending': Indicates that the returned values should be sorted in descending order.
    The default value is 'ascending'.
  • 'sort_by': String determining how the results are sorted. Supported values:
    • 'key': Indicates that the returned values should be sorted by key, which corresponds to the grouping columns. If you have multiple grouping columns (and are sorting by key), it will first sort the first grouping column, then the second grouping column, etc.
    • 'value': Indicates that the returned values should be sorted by value, which corresponds to the aggregates. If you have multiple aggregates (and are sorting by value), it will first sort by the first aggregate, then the second aggregate, etc.
    The default value is 'key'.
  • 'result_table': The name of the table used to store the results. Has the same naming restrictions as tables. Column names (group-by and aggregate fields) need to be given aliases e.g. ["FChar256 as fchar256", "sum(FDouble) as sfd"]. If present, no results are returned in the response. This option is not available if one of the grouping attributes is an unrestricted string (i.e.; not charN) type.
  • 'ttl': Sets the TTL of the table specified in result_table. The value must be the desired TTL in minutes.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

aggregate_group_by_request(request, callback) → {Promise}

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, and all column types except unrestricted-length strings may be used for computing applicable aggregates.

The results can be paged via the offset and 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"}.

options can be used to customize behavior of this call e.g. filtering or sorting the results.

To group by columns '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 a result_table name is specified in the options, the results are stored in a new table with that name. No results are returned in the response. If the source table's shard key is used as the grouping column(s), the result table will be sharded, in all other cases it will be replicated. Sorting will properly function only if the result table is replicated or if there is only one processing node and should not be relied upon in other cases.

Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

aggregate_histogram(table_name, column_name, start, end, interval, options, callback) → {Promise}

Performs a histogram calculation given a table, a column, and an interval function. The 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 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 an existing table or collection.
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 to use when calculating the bin values (values are summed). The column must be a numerical type (int, double, long, float).
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

aggregate_histogram_request(request, callback) → {Promise}

Performs a histogram calculation given a table, a column, and an interval function. The 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 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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

aggregate_k_means(table_name, column_names, k, tolerance, options, callback) → {Promise}

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 an existing table or collection.
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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

aggregate_k_means_request(request, callback) → {Promise}

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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

aggregate_min_max(table_name, column_name, options, callback) → {Promise}

Calculates and returns the minimum and maximum values of a particular column in a table.
Parameters:
Name Type Description
table_name String Name of the table on which the operation will be performed. Must be an existing table.
column_name String Name of a column or an expression of one or more column on which the min-max will be calculated.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

aggregate_min_max_request(request, callback) → {Promise}

Calculates and returns the minimum and maximum values of a particular column in a table.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

aggregate_statistics(table_name, column_name, stats, options, callback) → {Promise}

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 options. The weighted average is then defined as the sum of the products of 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". Supported values:
  • 'count': Number of objects (independent of the given column).
  • 'mean': Arithmetic mean (average), equivalent to sum/count.
  • 'stdv': Sample standard deviation (denominator is count-1).
  • 'variance': Unbiased sample variance (denominator is count-1).
  • 'skew': Skewness (third standardized moment).
  • 'kurtosis': Kurtosis (fourth standardized moment).
  • 'sum': Sum of all values in the column.
  • 'min': Minimum value of the column.
  • 'max': Maximum value of the column.
  • 'weighted_average': Weighted arithmetic mean (using the option 'weight_column_name' as the weighting column).
  • 'cardinality': Number of unique values in the column.
  • 'estimated_cardinality': Estimate (via hyperloglog technique) of the number of unique values in the column.
  • 'percentile': Estimate (via t-digest) of the given percentile of the column (percentile(50.0) will be an approximation of the median).
  • 'percentile_rank': Estimate (via t-digest) of the percentile rank of the given value in the column (if the given value is the median of the column, percentile_rank() will return approximately 50.0).
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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

aggregate_statistics_by_range(table_name, select_expression, column_name, value_column_name, stats, start, end, interval, options, callback) → {Promise}

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 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, 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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

aggregate_statistics_by_range_request(request, callback) → {Promise}

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 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, 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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

aggregate_statistics_request(request, callback) → {Promise}

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 options. The weighted average is then defined as the sum of the products of 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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

aggregate_unique(table_name, column_name, offset, limit, options, callback) → {Promise}

Returns all the unique values from a particular column (specified by column_name) of a particular table (specified by table_name). If column_name is a numeric column the values will be in binary_encoded_response. Otherwise if column_name is a string column the values will be in json_encoded_response. offset and 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 options would be::

{"limit":"10","sort_order":"descending"}.

The response is returned as a dynamic schema. For details see: dynamic schemas documentation.

If a result_table name is specified in the options, the results are stored in a new table with that name. No results are returned in the response. If the source table's shard key is used as the column_name, the result table will be sharded, in all other cases it will be replicated. Sorting will properly function only if the result table is replicated or if there is only one processing node and should not be relied upon in other cases.

Parameters:
Name Type Description
table_name String Name of the table on which the operation will be performed. Must be an existing table.
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.
  • 'collection_name': Name of a collection which is to contain the table specified in 'result_table', otherwise the table will be a top-level table. If the collection does not allow duplicate types and it contains a table of the same type as the given one, then this table creation request will fail.
  • 'expression': Optional filter expression to apply to the table.
  • 'sort_order': String indicating how the returned values should be sorted. Supported values:
    • 'ascending'
    • 'descending'
    The default value is 'ascending'.
  • 'result_table': The name of the table used to store the results. If present no results are returned in the response. Has the same naming restrictions as tables.
  • 'ttl': Sets the TTL of the table specified in 'result_table'. The value must be the desired TTL in minutes.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

aggregate_unique_request(request, callback) → {Promise}

Returns all the unique values from a particular column (specified by column_name) of a particular table (specified by table_name). If column_name is a numeric column the values will be in binary_encoded_response. Otherwise if column_name is a string column the values will be in json_encoded_response. offset and 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 options would be::

{"limit":"10","sort_order":"descending"}.

The response is returned as a dynamic schema. For details see: dynamic schemas documentation.

If a result_table name is specified in the options, the results are stored in a new table with that name. No results are returned in the response. If the source table's shard key is used as the column_name, the result table will be sharded, in all other cases it will be replicated. Sorting will properly function only if the result table is replicated or if there is only one processing node and should not be relied upon in other cases.

Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

alter_system_properties(property_updates_map, options, callback) → {Promise}

The GPUdb#alter_system_properties endpoint is primarily used to simplify the testing of the system and is not expected to be used during normal execution. Commands are given through the property_updates_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 OpenMP threads that will be used to service filter & aggregation requests against collections to the specified integer value.
  • 'kernel_omp_threads': Set the number of kernel OpenMP 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. Supported values:
    • 'true'
    • '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 num 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 Supported values:
    • 'true'
    • '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 semicolon-separated list of = expressions. Valid expressions are: seconds=
  • 'request_timeout': Number of minutes after which filtering (e.g., GPUdb#filter) and aggregating (e.g., GPUdb#aggregate_group_by) queries will timeout.
  • 'max_get_records_size': The maximum number of records the database will serve for a given data retrieval call
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

alter_system_properties_request(request, callback) → {Promise}

The GPUdb#alter_system_properties endpoint is primarily used to simplify the testing of the system and is not expected to be used during normal execution. Commands are given through the property_updates_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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

alter_table(table_name, action, value, options, callback) → {Promise}

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 GPUdb#get_records, GPUdb#delete_records, GPUdb#update_records) when using expressions containing equality or relational operators on indexed columns. This only applies to tables.

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.

Making a table protected or not. Protected tables have their TTLs set to not automatically expire. This can be applied to tables, views, and collections.

Allowing homogeneous tables within a collection. Managing a table's columns--a column can be added or removed, or have its type modified.

Parameters:
Name Type Description
table_name String Table on which the operation will be performed. Must be an existing table, view, or collection.
action String Modification operation to be applied Supported values:
  • 'create_index': Creates an index on the column name specified in value. If this column is already indexed, an error will be returned.
  • 'delete_index': Deletes an existing index on the column name specified in value. If this column does not have indexing turned on, an error will be returned.
  • 'allow_homogeneous_tables': Sets whether homogeneous tables are allowed in the given collection. This action is only valid if table_name is a collection. The value must be either 'true' or 'false'.
  • 'protected': Sets whether the given table_name should be protected or not. The value must be either 'true' or 'false'.
  • 'ttl': Sets the TTL of the table, view, or collection specified in table_name. The value must be the desired TTL in minutes.
  • 'add_column': Add a column value to the table. set the column properties in options
  • 'delete_column': Delete a column value from the table
  • 'change_column': Change properties of a column value in the table. set the column properties in options
  • 'rename_table': Rename a table, view or collection to value. Has the same naming restrictions as tables.
value String The value of the modification. May be a column name, 'true' or 'false', or a TTL depending on action.
options Object Optional parameters.
  • 'column_default_value': when adding a column: set a default value, for existing data.
  • 'column_properties': when adding or changing a column: set the column properties (strings, separated by a comma: data, store_only, text_search, char8, int8 etc).
  • 'column_type': when adding or changing a column: set the column type (strings, separated by a comma: int, double, string, null etc).
  • 'validate_change_column': Validate the type change before applying column_change request. Default is true (if option is missing). If true, then validate all values. A value too large (or too long) for the new type will prevent any change. If false, then when a value is too large or long, it will be truncated. Supported values:
    • 'true': true
    • 'false': false
    The default value is 'true'.
  • 'copy_values_from_column': when adding or changing a column: enter column name - from where to copy values.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

alter_table_metadata(table_names, metadata_map, options, callback) → {Promise}

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, or an error will be returned.
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.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

alter_table_metadata_request(request, callback) → {Promise}

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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

alter_table_request(request, callback) → {Promise}

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 GPUdb#get_records, GPUdb#delete_records, GPUdb#update_records) when using expressions containing equality or relational operators on indexed columns. This only applies to tables.

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.

Making a table protected or not. Protected tables have their TTLs set to not automatically expire. This can be applied to tables, views, and collections.

Allowing homogeneous tables within a collection. Managing a table's columns--a column can be added or removed, or have its type modified.

Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

alter_user(name, action, value, options, callback) → {Promise}

Alters a user.
Parameters:
Name Type Description
name String Name of the user to be altered. Must be an existing user.
action String Modification operation to be applied to the user. Supported values:
  • 'set_password': Sets the password of the user. The user must be an internal user.
value String The value of the modification, depending on action.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

alter_user_request(request, callback) → {Promise}

Alters a user.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

clear_table(table_name, authorization, options, callback) → {Promise}

Clears (drops) one or all tables in the database 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 table. Empty string clears all available tables.
authorization String No longer used. User can pass an empty string.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

clear_table_monitor(topic_id, options, callback) → {Promise}

Deactivates a table monitor previously created with GPUdb#create_table_monitor.
Parameters:
Name Type Description
topic_id String The topic ID returned by GPUdb#create_table_monitor.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

clear_table_monitor_request(request, callback) → {Promise}

Deactivates a table monitor previously created with GPUdb#create_table_monitor.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

clear_table_request(request, callback) → {Promise}

Clears (drops) one or all tables in the database 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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

clear_trigger(trigger_id, options, callback) → {Promise}

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
trigger_id String ID for the trigger to be deactivated.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

clear_trigger_request(request, callback) → {Promise}

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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_join_table(join_table_name, table_names, column_names, expressions, options, callback) → {Promise}

Creates a table that is the result of a SQL JOIN. For details see: join concept documentation.
Parameters:
Name Type Description
join_table_name String Name of the join table to be created. Has the same naming restrictions as tables.
table_names Array.<String> The list of table names composing the join. Corresponds to a SQL statement FROM clause
column_names Array.<String> List of member table columns or column expressions to be included in the join. Columns can be prefixed with 'table_id.column_name', where 'table_id' is the table name or alias. Columns can be aliased via the syntax 'column_name as alias'. Wild cards '*' can be used to include all columns across member tables or 'table_id.*' for all of a single table's columns. Columns and column expressions comprising the join must be uniquely named or aliased--therefore, the '*' wild card cannot be used if column names aren't unique across all tables.
expressions Array.<String> An optional list of expressions to combine and filter the joined tables. Corresponds to a SQL statement WHERE clause. For details see: expressions.
options Object Optional parameters.
  • 'collection_name': Name of a collection which is to contain the join. If the collection provided is non-existent, the collection will be automatically created. If empty, then the join will be at the top level.
  • 'max_query_dimensions': The maximum number of tables in a join that can be accessed by a query and are not equated by a foreign-key to primary-key equality predicate
  • 'optimize_lookups': Use more memory to speed up the joining of tables. Supported values:
    • 'true'
    • 'false'
    The default value is 'false'.
  • 'refresh_method': Method by which the join can be refreshed when the data in underlying member tables have changed. Supported values:
    • 'manual': refresh only occurs when manually requested by calling this endpoint with refresh option set to refresh or full_refresh
    • 'on_query': incrementally refresh (refresh just those records added) whenever a new query is issued and new data is inserted into the base table. A full refresh of all the records occurs when a new query is issued and there have been inserts to any non-base-tables since the last query
    • 'on_insert': incrementally refresh (refresh just those records added) whenever new data is inserted into a base table. A full refresh of all the records occurs when a new query is issued and there have been inserts to any non-base-tables since the last query
    The default value is 'manual'.
  • 'refresh': Do a manual refresh of the join if it exists - throws an error otherwise Supported values:
    • 'no_refresh': don't refresh
    • 'refresh': incrementally refresh (refresh just those records added) if new data has been inserted into the base table. A full refresh of all the records occurs if there have been inserts to any non-base-tables since the last refresh
    • 'full_refresh': always refresh even if no new records have been added. Only refresh method guaranteed to do a full refresh (refresh all the records) if a delete or update has occurred since the last refresh.
    The default value is 'no_refresh'.
  • 'ttl': Sets the TTL of the table specified in join_table_name. The value must be the desired TTL in minutes.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_join_table_request(request, callback) → {Promise}

Creates a table that is the result of a SQL JOIN. For details see: join concept documentation.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_proc(proc_name, execution_mode, files, command, args, options, callback) → {Promise}

Creates an instance (proc) of the user-defined function (UDF) specified by the given command, options, and files, and makes it available for execution. For details on UDFs, see: User-Defined Functions
Parameters:
Name Type Description
proc_name String Name of the proc to be created. Must not be the name of a currently existing proc.
execution_mode String The execution mode of the proc. Supported values:
  • 'distributed': Input table data will be divided into data segments that are distributed across all nodes in the cluster, and the proc command will be invoked once per data segment in parallel. Output table data from each invocation will be saved to the same node as the corresponding input data.
  • 'nondistributed': The proc command will be invoked only once per execution, and will not have access to any input or output table data.
The default value is 'distributed'.
files Object A map of the files that make up the proc. The keys of the map are file names, and the values are the binary contents of the files. The file names may include subdirectory names (e.g. 'subdir/file') but must not resolve to a directory above the root for the proc.
command String The command (excluding arguments) that will be invoked when the proc is executed. It will be invoked from the directory containing the proc files and may be any command that can be resolved from that directory. It need not refer to a file actually in that directory; for example, it could be 'java' if the proc is a Java application; however, any necessary external programs must be preinstalled on every database node. If the command refers to a file in that directory, it must be preceded with './' as per Linux convention. If not specified, and exactly one file is provided in files, that file will be invoked.
args Array.<String> An array of command-line arguments that will be passed to command when the proc is executed.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_proc_request(request, callback) → {Promise}

Creates an instance (proc) of the user-defined function (UDF) specified by the given command, options, and files, and makes it available for execution. For details on UDFs, see: User-Defined Functions
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_projection(table_name, projection_name, column_names, options, callback) → {Promise}

Creates a new projection of an existing table. A projection represents a subset of the columns (potentially including derived columns) of a table. A moving average can be calculated on a given column using the following syntax in the column_names parameter:

'moving_average(column_name,num_points_before,num_points_after) as new_column_name'

For each record in the 'column_name' parameter, it computes the average over the previous 'num_points_before' records and the subsequent 'num_points_after' records.

Note that moving average relies on order_by, and order_by requires that all the data being ordered resides on the same processing node, so it won't make sense to use order_by without moving average.

Parameters:
Name Type Description
table_name String Name of the existing table on which the projection is to be applied.
projection_name String Name of the projection to be created. Has the same naming restrictions as tables.
column_names Array.<String> List of columns from table_name to be included in the projection. Can include derived columns. Can be specified as aliased via the syntax 'column_name as alias'.
options Object Optional parameters.
  • 'collection_name': Name of a collection to which the projection is to be assigned as a child. If the collection provided is non-existent, the collection will be automatically created.
  • 'expression': An optional filter expression to be applied to the source table prior to the projection.
  • 'limit': The number of records to keep.
  • 'order_by': Comma-separated list of the columns to be sorted by; e.g. 'timestamp asc, x desc'. The columns specified must be present in column_names. If any alias is given for any column name, the alias must be used, rather than the original column name.
  • 'materialize_on_gpu': If true then the columns of the projection will be cached on the GPU. Supported values:
    • 'true'
    • 'false'
    The default value is 'false'.
  • 'ttl': Sets the TTL of the table, view, or collection specified in projection_name. The value must be the desired TTL in minutes.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_projection_request(request, callback) → {Promise}

Creates a new projection of an existing table. A projection represents a subset of the columns (potentially including derived columns) of a table. A moving average can be calculated on a given column using the following syntax in the column_names parameter:

'moving_average(column_name,num_points_before,num_points_after) as new_column_name'

For each record in the 'column_name' parameter, it computes the average over the previous 'num_points_before' records and the subsequent 'num_points_after' records.

Note that moving average relies on order_by, and order_by requires that all the data being ordered resides on the same processing node, so it won't make sense to use order_by without moving average.

Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_role(name, options, callback) → {Promise}

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.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_role_request(request, callback) → {Promise}

Creates a new role.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_table(table_name, type_id, options, callback) → {Promise}

Creates a new table or collection. If a new table is being created, the type of the table is given by type_id, which must the be the ID of a currently registered type (i.e. one created via GPUdb#create_type). The table will be created inside a collection if the option collection_name is specified. If that collection does not already exist, it will be created.

To create a new collection, specify the name of the collection in table_name and set the is_collection option to true; type_id will be ignored.

Parameters:
Name Type Description
table_name String Name of the table to be created. Error for requests with existing table of the same name and type id may be suppressed by using the no_error_if_exists option. See Tables for naming restrictions.
type_id String ID of a currently registered type. All objects added to the newly created table will be of this type. Ignored if is_collection is true.
options Object Optional parameters.
  • 'no_error_if_exists': If 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. Supported values:
    • 'true'
    • 'false'
    The default value is 'false'.
  • 'collection_name': Name of a collection which is to contain the newly created table. If empty, then the newly created table will be a top-level table. If the collection does not allow duplicate types and it contains a table of the same type as the given one, then this table creation request will fail.
  • 'is_collection': Indicates whether the new table to be created will be a collection. Supported values:
    • 'true'
    • 'false'
    The default value is 'false'.
  • 'disallow_homogeneous_tables': For a collection, indicates whether the collection prohibits containment of multiple tables of exactly the same data type. Supported values:
    • 'true'
    • 'false'
    The default value is 'false'.
  • 'is_replicated': For a table, indicates whether the table is to be replicated to all the database ranks. This may be necessary when the table is to be joined with other tables in a query. Supported values:
    • 'true'
    • 'false'
    The default value is 'false'.
  • 'foreign_keys': Semicolon-separated list of foreign key constraints, of the format 'source_column references target_table(primary_key_column)'.
  • 'foreign_shard_key': Foreign shard key description of the format: references from ()
  • 'ttl': Sets the TTL of the table or collection specified in table_name. The value must be the desired TTL in minutes.
  • 'is_result_table': For a table, indicates whether the table is a non-persistent, memory-only table that will store the output of a proc executed with GPUdb#execute_proc. A result table cannot contain store_only, text_search, or string columns (char columns are acceptable), records cannot be inserted into it directly, and it will not be retained if the server is restarted. Supported values:
    • 'true'
    • 'false'
    The default value is 'false'.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_table_monitor(table_name, options, callback) → {Promise}

Creates a monitor that watches for new records inserted into a particular table (identified by table_name) and forwards copies to subscribers via ZMQ. After this call completes, subscribe to the returned topic_id on the 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 GPUdb#clear_table_monitor.
Parameters:
Name Type Description
table_name String Name of the table to monitor. Must not refer to a collection.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_table_monitor_request(request, callback) → {Promise}

Creates a monitor that watches for new records inserted into a particular table (identified by table_name) and forwards copies to subscribers via ZMQ. After this call completes, subscribe to the returned topic_id on the 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 GPUdb#clear_table_monitor.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_table_request(request, callback) → {Promise}

Creates a new table or collection. If a new table is being created, the type of the table is given by type_id, which must the be the ID of a currently registered type (i.e. one created via GPUdb#create_type). The table will be created inside a collection if the option collection_name is specified. If that collection does not already exist, it will be created.

To create a new collection, specify the name of the collection in table_name and set the is_collection option to true; type_id will be ignored.

Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_trigger_by_area(request_id, table_names, x_column_name, x_vector, y_column_name, y_vector, options, callback) → {Promise}

Sets up an area trigger mechanism for two column_names for one or more tables. (This function is essentially the two-dimensional version of GPUdb#create_trigger_by_range.) Once the trigger has been activated, any record added to the listed tables(s) via GPUdb#insert_records with the chosen columns' values falling within the specified region will trip the trigger. All such records will be queued at the trigger port (by default '9001', but able to be retrieved via GPUdb#show_system_status) for any listening client to collect. Active triggers can be cancelled by using the GPUdb#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 User-created ID for the trigger. The ID can be alphanumeric, contain symbols, and must contain at least one character.
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.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_trigger_by_area_request(request, callback) → {Promise}

Sets up an area trigger mechanism for two column_names for one or more tables. (This function is essentially the two-dimensional version of GPUdb#create_trigger_by_range.) Once the trigger has been activated, any record added to the listed tables(s) via GPUdb#insert_records with the chosen columns' values falling within the specified region will trip the trigger. All such records will be queued at the trigger port (by default '9001', but able to be retrieved via GPUdb#show_system_status) for any listening client to collect. Active triggers can be cancelled by using the GPUdb#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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_trigger_by_range(request_id, table_names, column_name, min, max, options, callback) → {Promise}

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 GPUdb#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 the trigger port (by default '9001', but able to be retrieved via GPUdb#show_system_status) for any listening client to collect. Active triggers can be cancelled by using the GPUdb#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 User-created ID for the trigger. The ID can be alphanumeric, contain symbols, and must contain at least one character.
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.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_trigger_by_range_request(request, callback) → {Promise}

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 GPUdb#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 the trigger port (by default '9001', but able to be retrieved via GPUdb#show_system_status) for any listening client to collect. Active triggers can be cancelled by using the GPUdb#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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_type(type_definition, label, properties, options, callback) → {Promise}

Creates a new type 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 data and 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 a uniqueness constraint is enforced, in that only a single object can exist with a given primary key. When inserting 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::

{"type":"record", "name":"point", "fields":[{"name":"msg_id","type":"string"}, {"name":"x","type":"double"}, {"name":"y","type":"double"}, {"name":"TIMESTAMP","type":"double"}, {"name":"source","type":"string"}, {"name":"group_id","type":"string"}, {"name":"OBJECT_ID","type":"string"}] }

Properties::

{"group_id":["store_only"], "msg_id":["store_only","text_search"] }

Parameters:
Name Type Description
type_definition String 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). Valid values are:
  • 'data': Default property for all numeric and string type columns; makes the column available for GPU queries.
  • 'text_search': Valid only for 'string' columns. Enables full text search for string columns. Can be set independently of *data* and *store_only*.
  • 'store_only': Persist the column value but do not make it available to queries (e.g. GPUdb#filter_by_box)-i.e. it is mutually exclusive to the 'data' property. Any 'bytes' type column must have a 'store_only' property. This property reduces system memory usage.
  • 'disk_optimized': Works in conjunction with the 'data' property for string columns. This property reduces system disk usage by disabling reverse string lookups. Queries like GPUdb#filter, GPUdb#filter_by_list, and GPUdb#filter_by_value work as usual but GPUdb#aggregate_unique, GPUdb#aggregate_group_by and GPUdb#get_records_by_column are not allowed on columns with this property.
  • 'timestamp': Valid only for 'long' columns. Indicates that this field represents a timestamp and will be provided in milliseconds since the Unix epoch: 00:00:00 Jan 1 1970. Dates represented by a timestamp must fall between the year 1000 and the year 2900.
  • 'decimal': Valid only for 'string' columns. It represents a SQL type NUMERIC(19, 4) data type. There can be up to 15 digits before the decimal point and up to four digits in the fractional part. The value can be positive or negative (indicated by a minus sign at the beginning). This property is mutually exclusive with the 'text_search' property.
  • 'date': Valid only for 'string' columns. Indicates that this field represents a date and will be provided in the format 'YYYY-MM-DD'. The allowable range is 1000-01-01 through 2900-01-01.
  • 'time': Valid only for 'string' columns. Indicates that this field represents a time-of-day and will be provided in the format 'HH:MM:SS.mmm'. The allowable range is 00:00:00.000 through 23:59:59.999.
  • 'char1': This property provides optimized memory, disk and query performance for string columns. Strings with this property must be no longer than 1 character. This property cannot be combined with *text_search*
  • 'char2': This property provides optimized memory, disk and query performance for string columns. Strings with this property must be no longer than 2 characters. This property cannot be combined with *text_search*
  • 'char4': This property provides optimized memory, disk and query performance for string columns. Strings with this property must be no longer than 4 characters. This property cannot be combined with *text_search*
  • 'char8': This property provides optimized memory, disk and query performance for string columns. Strings with this property must be no longer than 8 characters. This property cannot be combined with *text_search*
  • 'char16': This property provides optimized memory, disk and query performance for string columns. Strings with this property must be no longer than 16 characters. This property cannot be combined with *text_search*
  • 'char32': This property provides optimized memory, disk and query performance for string columns. Strings with this property must be no longer than 32 characters. This property cannot be combined with *text_search*
  • 'char64': This property provides optimized memory, disk and query performance for string columns. Strings with this property must be no longer than 64 characters. This property cannot be combined with *text_search*
  • 'char128': This property provides optimized memory, disk and query performance for string columns. Strings with this property must be no longer than 128 characters. This property cannot be combined with *text_search*
  • 'char256': This property provides optimized memory, disk and query performance for string columns. Strings with this property must be no longer than 256 characters. This property cannot be combined with *text_search*
  • 'int8': This property provides optimized memory and query performance for int columns. Ints with this property must be between -128 and +127 (inclusive)
  • 'int16': This property provides optimized memory and query performance for int columns. Ints with this property must be between -32768 and +32767 (inclusive)
  • 'ipv4': This property provides optimized memory, disk and query performance for string columns representing IPv4 addresses (i.e. 192.168.1.1). Strings with this property must be of the form: A.B.C.D where A, B, C and D are in the range of 0-255.
  • 'primary_key': This property indicates that this column will be part of (or the entire) primary key.
  • 'shard_key': This property indicates that this column will be part of (or the entire) shard key.
  • 'nullable': This property indicates that this column is nullable. However, setting this property is insufficient for making the column nullable. The user must declare the type of the column as a union between its regular type and 'null' in the avro schema for the record type in type_definition. For example, if a column is of type integer and is nullable, then the entry for the column in the avro schema must be: ['int', 'null']. The Java and C++ APIs have built-in convenience for bypassing setting the avro schema by hand. For those two languages, one can use this property as usual and not have to worry about the avro schema for the record.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_type_request(request, callback) → {Promise}

Creates a new type 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 data and 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 a uniqueness constraint is enforced, in that only a single object can exist with a given primary key. When inserting 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::

{"type":"record", "name":"point", "fields":[{"name":"msg_id","type":"string"}, {"name":"x","type":"double"}, {"name":"y","type":"double"}, {"name":"TIMESTAMP","type":"double"}, {"name":"source","type":"string"}, {"name":"group_id","type":"string"}, {"name":"OBJECT_ID","type":"string"}] }

Properties::

{"group_id":["store_only"], "msg_id":["store_only","text_search"] }

Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_union(table_name, table_names, input_column_names, output_column_names, options, callback) → {Promise}

Performs a union (concatenation) of one or more existing tables or views, the results of which are stored in a new view. 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'. Though not explicitly unions, intersect and except are also available from this endpoint.
Parameters:
Name Type Description
table_name String Name of the table to be created. Has the same naming restrictions as tables.
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 which is to contain the union. If the collection provided is non-existent, the collection will be automatically created. If empty, then the union will be a top-level table.
  • 'materialize_on_gpu': If 'true' then the columns of the union will be cached on the GPU. Supported values:
    • 'true'
    • 'false'
    The default value is 'false'.
  • 'mode': If 'merge_views' then this operation will merge (i.e. union) the provided views. All 'table_names' must be views from the same underlying base table. Supported values:
    • 'union_all': Retains all rows from the specified tables.
    • 'union': Retains all unique rows from the specified tables (synonym for 'union_distinct').
    • 'union_distinct': Retains all unique rows from the specified tables.
    • 'except': Retains all unique rows from the first table that do not appear in the second table (only works on 2 tables).
    • 'intersect': Retains all unique rows that appear in both of the specified tables (only works on 2 tables).
    • 'merge_views': Merge two or more views (or views of views) of the same base data set into a new view. The resulting view would match the results of a SQL OR operation, e.g., if filter 1 creates a view using the expression 'x = 10' and filter 2 creates a view using the expression 'x <= 10', then the merge views operation creates a new view using the expression 'x = 10 OR x <= 10'.
    The default value is 'union_all'.
  • 'ttl': Sets the TTL of the table specified in table_name. The value must be the desired TTL in minutes.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_union_request(request, callback) → {Promise}

Performs a union (concatenation) of one or more existing tables or views, the results of which are stored in a new view. 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'. Though not explicitly unions, intersect and except are also available from this endpoint.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_user_external(name, options, callback) → {Promise}

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.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_user_external_request(request, callback) → {Promise}

Creates a new external user (a user whose credentials are managed by an external LDAP).
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_user_internal(name, password, options, callback) → {Promise}

Creates a new internal user (a user whose credentials are managed by the database system).
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.
password String Initial password of the user to be created. May be an empty string for no password.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

create_user_internal_request(request, callback) → {Promise}

Creates a new internal user (a user whose credentials are managed by the database system).
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

delete_proc(proc_name, options, callback) → {Promise}

Deletes a proc. Any currently running instances of the proc will be killed.
Parameters:
Name Type Description
proc_name String Name of the proc to be deleted. Must be the name of a currently existing proc.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

delete_proc_request(request, callback) → {Promise}

Deletes a proc. Any currently running instances of the proc will be killed.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

delete_records(table_name, expressions, options, callback) → {Promise}

Deletes record(s) matching the provided criteria from the given table. The record selection criteria can either be one or more expressions (matching multiple records) or a single record identified by 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 here. Specifying one or more expressions is mutually exclusive to specifying record_id in the options.
options Object Optional parameters.
  • 'global_expression': An optional global expression to reduce the search space of the expressions.
  • 'record_id': A record id identifying a single record, obtained at the time of insertion of the record or by calling GPUdb#get_records_from_collection with the *return_record_ids* option.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

delete_records_request(request, callback) → {Promise}

Deletes record(s) matching the provided criteria from the given table. The record selection criteria can either be one or more expressions (matching multiple records) or a single record identified by 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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

delete_role(name, options, callback) → {Promise}

Deletes an existing role.
Parameters:
Name Type Description
name String Name of the role to be deleted. Must be an existing role.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

delete_role_request(request, callback) → {Promise}

Deletes an existing role.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

delete_user(name, options, callback) → {Promise}

Deletes an existing user.
Parameters:
Name Type Description
name String Name of the user to be deleted. Must be an existing user.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

delete_user_request(request, callback) → {Promise}

Deletes an existing user.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

execute_proc(proc_name, params, bin_params, input_table_names, input_column_names, output_table_names, options, callback) → {Promise}

Executes a proc. This endpoint is asynchronous and does not wait for the proc to complete before returning.
Parameters:
Name Type Description
proc_name String Name of the proc to execute. Must be the name of a currently existing proc.
params Object A map containing named parameters to pass to the proc. Each key/value pair specifies the name of a parameter and its value.
bin_params Object A map containing named binary parameters to pass to the proc. Each key/value pair specifies the name of a parameter and its value.
input_table_names Array.<String> Names of the tables containing data to be passed to the proc. Each name specified must be the name of a currently existing table. If no table names are specified, no data will be passed to the proc.
input_column_names Object Map of table names from input_table_names to lists of names of columns from those tables that will be passed to the proc. Each column name specified must be the name of an existing column in the corresponding table. If a table name from input_table_names is not included, all columns from that table will be passed to the proc.
output_table_names Array.<String> Names of the tables to which output data from the proc will be written. If a specified table does not exist, it will automatically be created with the same schema as the corresponding table (by order) from input_table_names, excluding any primary and shard keys. If a specified table is a non-persistent result table, it must not have primary or shard keys. If no table names are specified, no output data can be returned from the proc.
options Object Optional parameters.
  • 'cache_input': A comma-delimited list of table names from input_table_names from which input data will be cached for use in subsequent calls to GPUdb#execute_proc with the use_cached_input option. Cached input data will be retained until the proc status is cleared with the clear_complete option of GPUdb#show_proc_status and all proc instances using the cached data have completed.
  • 'use_cached_input': A comma-delimited list of run IDs (as returned from prior calls to GPUdb#execute_proc) of running or completed proc instances from which input data cached using the cache_input option will be used. Cached input data will not be used for any tables specified in input_table_names, but data from all other tables cached for the specified run IDs will be passed to the proc. If the same table was cached for multiple specified run IDs, the cached data from the first run ID specified in the list that includes that table will be used.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

execute_proc_request(request, callback) → {Promise}

Executes a proc. This endpoint is asynchronous and does not wait for the proc to complete before returning.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

filter(table_name, view_name, expression, options, callback) → {Promise}

Filters data based on the specified expression. The results are stored in a result set with the given view_name.

For details see concepts.

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. Has the same naming restrictions as tables.
expression String The select expression to filter the specified table. For details see concepts.
options Object Optional parameters.
  • 'collection_name': Name of a collection which is to contain the newly created view, otherwise the view will be a top-level table. If the collection does not allow duplicate types and it contains a table of the same type as the given one, then this table creation request will fail.
  • 'ttl': Sets the TTL of the view specified in view_name. The value must be the desired TTL in minutes.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

filter_by_area(table_name, view_name, x_column_name, x_vector, y_column_name, y_vector, options, callback) → {Promise}

Calculates which objects from a table are within a named area of interest (NAI/polygon). The operation is synchronous, meaning that a response will not be returned 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 view_name passed in as part of the input.

Note that if you call this endpoint using a table that has WKT data, the x_column_name and y_column_name settings are no longer required because the geospatial filter works automatically.

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. Has the same naming restrictions as tables.
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.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

filter_by_area_request(request, callback) → {Promise}

Calculates which objects from a table are within a named area of interest (NAI/polygon). The operation is synchronous, meaning that a response will not be returned 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 view_name passed in as part of the input.

Note that if you call this endpoint using a table that has WKT data, the x_column_name and y_column_name settings are no longer required because the geospatial filter works automatically.

Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

filter_by_box(table_name, view_name, x_column_name, min_x, max_x, y_column_name, min_y, max_y, options, callback) → {Promise}

Calculates how many objects within the given table lie in a rectangular box. The operation is synchronous, meaning that a response will not be returned 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 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 an existing table.
view_name String Optional name of the result view that will be created containing the results of the query. Has the same naming restrictions as tables.
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 x_column_name. Must be less than or equal to max_x.
max_x Number Upper bound for x_column_name. Must be greater than or equal to 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 y_column_name. Must be less than or equal to max_y.
max_y Number Upper bound for y_column_name. Must be greater than or equal to min_y.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

filter_by_box_request(request, callback) → {Promise}

Calculates how many objects within the given table lie in a rectangular box. The operation is synchronous, meaning that a response will not be returned 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 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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

filter_by_geometry(table_name, view_name, column_name, input_wkt, operation, options, callback) → {Promise}

Applies a geometry filter against a spatial column named WKT in a given table, collection or view. The filtering geometry is provided by 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. Has the same naming restrictions as tables.
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 table_name.
operation String The geometric filtering operation to perform Supported values:
  • 'contains': Matches records that contain the given WKT in input_wkt, i.e. the given WKT is within the bounds of a record's geometry.
  • 'crosses': Matches records that cross the given WKT.
  • 'disjoint': Matches records that are disjoint from the given WKT.
  • 'equals': Matches records that are the same as the given WKT.
  • 'intersects': Matches records that intersect the given WKT.
  • 'overlaps': Matches records that overlap the given WKT.
  • 'touches': Matches records that touch the given WKT.
  • 'within': Matches records that are within the given WKT.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

filter_by_geometry_request(request, callback) → {Promise}

Applies a geometry filter against a spatial column named WKT in a given table, collection or view. The filtering geometry is provided by input_wkt.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

filter_by_list(table_name, view_name, column_values_map, options, callback) → {Promise}

Calculates which records from a table have values in the given list for the corresponding column. The operation is synchronous, meaning that a response will not be returned 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 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 both in the respective x- and y-lists, e.g., "x = 10.1 and y = 0.0", "x = 2.3 and y = -31.5", etc. However, a record with "x = 10.1 and y = -31.5" or "x = 2.3 and y = 0.0" would not be returned because the values in the given lists do not correspond.

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. Has the same naming restrictions as tables.
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'. Supported values:
    • 'in_list': The filter will match all items that are in the provided list(s).
    • 'not_in_list': The filter will match all items that are not in the provided list(s).
    The default value is 'in_list'.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

filter_by_list_request(request, callback) → {Promise}

Calculates which records from a table have values in the given list for the corresponding column. The operation is synchronous, meaning that a response will not be returned 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 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 both in the respective x- and y-lists, e.g., "x = 10.1 and y = 0.0", "x = 2.3 and y = -31.5", etc. However, a record with "x = 10.1 and y = -31.5" or "x = 2.3 and y = 0.0" would not be returned because the values in the given lists do not correspond.

Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

filter_by_radius(table_name, view_name, x_column_name, x_center, y_column_name, y_center, radius, options, callback) → {Promise}

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 a response will not be returned 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 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.
view_name String If provided, then this will be the name of the view containing the results. Has the same naming restrictions as tables.
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.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

filter_by_radius_request(request, callback) → {Promise}

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 a response will not be returned 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 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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

filter_by_range(table_name, view_name, column_name, lower_bound, upper_bound, options, callback) → {Promise}

Calculates which objects from a table have a column that is within the given bounds. An object from the table identified by table_name is added to the view view_name if its column is within [lower_bound, upper_bound] (inclusive). The operation is synchronous. The response provides a count of the number of objects which passed the bound filter. Although this functionality can also be accomplished with the standard filter function, it is more efficient.

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 an existing table.
view_name String If provided, then this will be the name of the view containing the results. Has the same naming restrictions as tables.
column_name String Name of a column on which the operation would be applied.
lower_bound Number Value of the lower bound (inclusive).
upper_bound Number Value of the upper bound (inclusive).
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

filter_by_range_request(request, callback) → {Promise}

Calculates which objects from a table have a column that is within the given bounds. An object from the table identified by table_name is added to the view view_name if its column is within [lower_bound, upper_bound] (inclusive). The operation is synchronous. The response provides a count of the number of objects which passed the bound filter. Although this functionality can also be accomplished with the standard filter function, it is more efficient.

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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

filter_by_series(table_name, view_name, track_id, target_track_ids, options, callback) → {Promise}

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 a response will not be returned 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. Has the same naming restrictions as tables.
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'. Supported values:
    • 'euclidean'
    • 'great_circle'
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

filter_by_series_request(request, callback) → {Promise}

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 a response will not be returned until all the objects are fully available.

Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

filter_by_string(table_name, view_name, expression, mode, column_names, options, callback) → {Promise}

Calculates which objects from a table, collection, or view match a string expression for the given string columns. The options 'case_sensitive' can be used to modify the behavior for all modes except 'search'. For 'search' mode details and limitations, see Full Text Search.
Parameters:
Name Type Description
table_name String Name of the table on which the filter operation will be performed. Must be an existing table, collection or view.
view_name String If provided, then this will be the name of the view containing the results. Has the same naming restrictions as tables.
expression String The expression with which to filter the table.
mode String The string filtering mode to apply. See below for details. Supported values:
  • 'search': Full text search query with wildcards and boolean operators. Note that for this mode, no column can be specified in column_names; all string columns of the table that have text search enabled will be searched.
  • '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.
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. Supported values:
    • 'true'
    • 'false'
    The default value is 'true'.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

filter_by_string_request(request, callback) → {Promise}

Calculates which objects from a table, collection, or view match a string expression for the given string columns. The options 'case_sensitive' can be used to modify the behavior for all modes except 'search'. For 'search' mode details and limitations, see Full Text Search.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

filter_by_table(table_name, view_name, column_name, source_table_name, source_table_column_name, options, callback) → {Promise}

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 view_name is specified, then the filtered objects will then be put in a newly created view. The operation is synchronous, meaning that a response will not be returned 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.
view_name String If provided, then this will be the name of the view containing the results. Has the same naming restrictions as tables.
column_name String Name of the column by whose value the data will be filtered from the table designated by table_name.
source_table_name String Name of the table whose data will be compared against in the table called table_name. Must be an existing table.
source_table_column_name String Name of the column in the source_table_name whose values will be used as the filter for table table_name. Must match the type of the column_name.
options Object Optional parameters.
  • 'filter_mode': String indicating the filter mode, either in_table or not_in_table. Supported values:
    • 'in_table'
    • 'not_in_table'
    The default value is 'in_table'.
  • 'mode': Mode - should be either spatial or normal. Supported values:
    • 'normal'
    • 'spatial'
    The default value is 'normal'.
  • 'buffer': Buffer size, in meters. Only relevant for spatial mode.
  • 'buffer_method': Method used to buffer polygons. Only relevant for spatial mode. Supported values:
    • 'normal'
    • 'geos': Use geos 1 edge per corner algorithm
    The default value is 'normal'.
  • 'max_partition_size': Maximum number of points in a partition. Only relevant for spatial mode.
  • 'max_partition_score': Maximum number of points * edges in a partition. Only relevant for spatial mode.
  • 'x_column_name': Name of column containing x value of point being filtered in spatial mode.
  • 'y_column_name': Name of column containing y value of point being filtered in spatial mode.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

filter_by_table_request(request, callback) → {Promise}

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 view_name is specified, then the filtered objects will then be put in a newly created view. The operation is synchronous, meaning that a response will not be returned 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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

filter_by_value(table_name, view_name, is_string, value, value_str, column_name, options, callback) → {Promise}

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 a response will not be returned 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. Although this functionality can also be accomplished with the standard filter function, it is more efficient.
Parameters:
Name Type Description
table_name String Name of an existing table on which to perform the calculation.
view_name String If provided, then this will be the name of the view containing the results. Has the same naming restrictions as tables.
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 on which the filter by value would be applied.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

filter_by_value_request(request, callback) → {Promise}

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 a response will not be returned 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. Although this functionality can also be accomplished with the standard filter function, it is more efficient.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

filter_request(request, callback) → {Promise}

Filters data based on the specified expression. The results are stored in a result set with the given view_name.

For details see concepts.

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
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

get_records(table_name, offset, limit, options, callback) → {Promise}

Retrieves records from a given table, optionally filtered by an expression and/or sorted by a column. This operation can be performed on tables, views, or on homogeneous collections (collections containing tables of all the same type). Records can be returned encoded as binary or json.

This operation supports paging through the data via the offset and 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.

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.
  • 'fast_index_lookup': Indicates if indexes should be used to perform the lookup for a given expression if possible. Only applicable if there is no sorting, the expression contains only equivalence comparisons based on existing tables indexes and the range of requested values is from [0 to END_OF_SET]. The default value is true.
  • '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. If sort_order is provided, sort_by has to be provided. Supported values:
    • 'ascending'
    • 'descending'
    The default value is 'ascending'.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

get_records_by_column(table_name, column_names, offset, limit, options, callback) → {Promise}

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.

The response is returned as a dynamic schema. For details see: dynamic schemas documentation.

Parameters:
Name Type Description
table_name String 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.
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_SET (-9999) to indicate that the maximum number of results allowed by the server 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'. If sort_order is provided, sort_by has to be provided. Supported values:
    • 'ascending'
    • 'descending'
    The default value is 'ascending'.
  • 'order_by': Comma-separated list of the columns to be sorted by; e.g. 'timestamp asc, x desc'. The columns specified must be present in column_names. If any alias is given for any column name, the alias must be used, rather than the original column name.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

get_records_by_column_request(request, callback) → {Promise}

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.

The response is returned as a dynamic schema. For details see: dynamic schemas documentation.

Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

get_records_by_series(table_name, world_table_name, offset, limit, options, callback) → {Promise}

Retrieves the complete series/track records from the given world_table_name based on the partial track information contained in the table_name.

This operation supports paging through the data via the offset and limit parameters.

In contrast to GPUdb#get_records this returns records grouped by series/track. So if offset is 0 and limit is 5 this operation would return the first 5 series/tracks in 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 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.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

get_records_by_series_request(request, callback) → {Promise}

Retrieves the complete series/track records from the given world_table_name based on the partial track information contained in the table_name.

This operation supports paging through the data via the offset and limit parameters.

In contrast to GPUdb#get_records this returns records grouped by series/track. So if offset is 0 and limit is 5 this operation would return the first 5 series/tracks in 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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

get_records_from_collection(table_name, offset, limit, options, callback) → {Promise}

Retrieves records from a collection. The operation can optionally return the record IDs which can be used in certain queries such as GPUdb#delete_records.

This operation supports paging through the data via the offset and 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 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 the internal record ID along with each returned record. Default is 'false'. Supported values:
    • 'true'
    • 'false'
    The default value is 'false'.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

get_records_from_collection_request(request, callback) → {Promise}

Retrieves records from a collection. The operation can optionally return the record IDs which can be used in certain queries such as GPUdb#delete_records.

This operation supports paging through the data via the offset and 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
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

get_records_request(request, callback) → {Promise}

Retrieves records from a given table, optionally filtered by an expression and/or sorted by a column. This operation can be performed on tables, views, or on homogeneous collections (collections containing tables of all the same type). Records can be returned encoded as binary or json.

This operation supports paging through the data via the offset and 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.

Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

grant_permission_system(name, permission, options, callback) → {Promise}

Grants a system-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. Supported values:
  • 'system_admin': Full access to all data and system functions.
  • 'system_write': Read and write access to all tables.
  • 'system_read': Read-only access to all tables.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

grant_permission_system_request(request, callback) → {Promise}

Grants a system-level permission to a user or role.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

grant_permission_table(name, permission, table_name, filter_expression, options, callback) → {Promise}

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. Supported values:
  • 'table_admin': Full read/write and administrative access to the table.
  • 'table_insert': Insert access to the table.
  • 'table_update': Update access to the table.
  • 'table_delete': Delete access to the table.
  • 'table_read': Read access to the table.
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.
filter_expression String Reserved for future use.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

grant_permission_table_request(request, callback) → {Promise}

Grants a table-level permission to a user or role.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

grant_role(role, member, options, callback) → {Promise}

Grants membership in a role to a user or role.
Parameters:
Name Type Description
role String Name of the role in which membership will be granted. Must be an existing role.
member String Name of the user or role that will be granted membership in role. Must be an existing user or role.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

grant_role_request(request, callback) → {Promise}

Grants membership in a role to a user or role.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

has_proc(proc_name, options, callback) → {Promise}

Checks the existence of a proc with the given name.
Parameters:
Name Type Description
proc_name String Name of the proc to check for existence.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

has_proc_request(request, callback) → {Promise}

Checks the existence of a proc with the given name.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

has_table(table_name, options, callback) → {Promise}

Checks for the existence of a table with the given name.
Parameters:
Name Type Description
table_name String Name of the table to check for existence.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

has_table_request(request, callback) → {Promise}

Checks for the existence of a table with the given name.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

has_type(type_id, options, callback) → {Promise}

Check for the existence of a type.
Parameters:
Name Type Description
type_id String Id of the type returned in response to GPUdb#create_type request.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

has_type_request(request, callback) → {Promise}

Check for the existence of a type.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

insert_records(table_name, data, options, callback) → {Promise}

Adds multiple records to the specified table. The operation is synchronous, meaning that a response will not be returned until all the records are fully inserted and available. The response payload provides the counts of the number of records actually inserted and/or updated, and can provide the unique identifier of each added record.

The options parameter can be used to customize this function's behavior. The update_on_existing_pk option specifies the primary-key collision policy. If the table has a primary key and if 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 update_on_existing_pk is false and if the records being added have the same primary key as existing records, they 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 update_on_existing_pk option is ignored.

The return_record_ids option indicates that the database should return the unique identifiers of inserted records.

The route_to_address option directs that inserted records should be targeted for a particular database node.

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 list_encoding is binary.
options Object Optional parameters.
  • 'update_on_existing_pk': If the table has a primary key, 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, they 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. Supported values:
    • 'true'
    • 'false'
    The default value is 'false'.
  • 'return_record_ids': If true then return the internal record id along for each inserted record. Supported values:
    • 'true'
    • 'false'
    The default value is 'false'.
  • 'route_to_address': Route to a specific rank/tom. Option not suitable for tables using primary/shard keys
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

insert_records_random(table_name, count, options, callback) → {Promise}

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 a response will not be returned 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:
  • 'seed': If provided, the internal random number generator will be initialized with the given value. The minimum is 0. This allows for the same set of random numbers to be generated across invocation of this endpoint in case the user wants to repeat the test. Since options, is a map of maps, we need an internal map to provide the seed value. For example, to pass 100 as the seed value through this parameter, you need something equivalent to: 'options' = {'seed': { 'value': 100 } }
    • 'value': Pass the seed value here.
  • '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, an error will not be thrown in such a case. It is the responsibility of the user to use the 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, an error will not be thrown in such a case. It is the responsibility of the user to use the 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). No nulls would be generated for nullable columns.
    • 'null_percentage': If specified, then generate the given percentage of the count as nulls for all nullable columns. This option will be ignored for non-nullable columns. The value must be within the range [0, 1.0]. The default value is 5% (0.05).
  • 'attr_name': Set the following parameters for the column specified by the key. This overrides any parameter set by 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, an error will not be thrown in such a case. It is the responsibility of the user to use the 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, an error will not be thrown in such a case. It is the responsibility of the user to use the 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). No nulls would be generated for nullable columns.
    • 'null_percentage': If specified and if this column is nullable, then generate the given percentage of the count as nulls. This option will result in an error if the column is not nullable. The value must be within the range [0, 1.0]. The default value is 5% (0.05).
  • 'track_length': This key-map pair is only valid for track type data sets (an error is thrown otherwise). No nulls would be generated for nullable columns.
    • '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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

insert_records_random_request(request, callback) → {Promise}

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 a response will not be returned until all random records are fully available.

Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

insert_records_request(request, callback) → {Promise}

Adds multiple records to the specified table. The operation is synchronous, meaning that a response will not be returned until all the records are fully inserted and available. The response payload provides the counts of the number of records actually inserted and/or updated, and can provide the unique identifier of each added record.

The options parameter can be used to customize this function's behavior. The update_on_existing_pk option specifies the primary-key collision policy. If the table has a primary key and if 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 update_on_existing_pk is false and if the records being added have the same primary key as existing records, they 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 update_on_existing_pk option is ignored.

The return_record_ids option indicates that the database should return the unique identifiers of inserted records.

The route_to_address option directs that inserted records should be targeted for a particular database node.

Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

insert_symbol(symbol_id, symbol_format, symbol_data, options, callback) → {Promise}

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) if the 'dosymbology' parameter is 'true' then the value of the 'SYMBOLCODE' column is used 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'. Supported values:
  • 'svg'
  • 'svg_path'
symbol_data String The actual symbol data. If symbol_format is 'svg' then this should be the raw bytes representing an svg file. If 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 symbol_format is 'svg' this is ignored. If 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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

insert_symbol_request(request, callback) → {Promise}

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) if the 'dosymbology' parameter is 'true' then the value of the 'SYMBOLCODE' column is used to pick the symbol displayed for each point.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

kill_proc(run_id, options, callback) → {Promise}

Kills a running proc instance.
Parameters:
Name Type Description
run_id String The run ID of the running proc instance. If the run ID is not found or the proc instance has already completed, this does nothing. If not specified, all running proc instances will be killed.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

kill_proc_request(request, callback) → {Promise}

Kills a running proc instance.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

lock_table(table_name, lock_type, options, callback) → {Promise}

Manages global access to a table's data. By default a table has a lock_type of unlock, indicating all operations are permitted. A user may request a read-only or a write-only lock, after which only read or write operations, respectively, are permitted on the table until the lock is removed. When lock_type is disable then no operations are permitted on the table. The lock status can be queried by setting lock_type to 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 status will return the current lock status of the table without changing it. Supported values:
  • 'status': Show locked status
  • 'disable': Allow no read/write operations
  • 'read-only': Allow only read operations
  • 'write-only': Allow only write operations
  • 'unlock': Allow all read/write operations
The default value is 'status'.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

lock_table_request(request, callback) → {Promise}

Manages global access to a table's data. By default a table has a lock_type of unlock, indicating all operations are permitted. A user may request a read-only or a write-only lock, after which only read or write operations, respectively, are permitted on the table until the lock is removed. When lock_type is disable then no operations are permitted on the table. The lock status can be queried by setting lock_type to status.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

revoke_permission_system(name, permission, options, callback) → {Promise}

Revokes a system-level permission from a user or role.
Parameters:
Name Type Description
name String Name of the user or role from which the permission will be revoked. Must be an existing user or role.
permission String Permission to revoke from the user or role. Supported values:
  • 'system_admin': Full access to all data and system functions.
  • 'system_write': Read and write access to all tables.
  • 'system_read': Read-only access to all tables.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

revoke_permission_system_request(request, callback) → {Promise}

Revokes a system-level permission from a user or role.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

revoke_permission_table(name, permission, table_name, options, callback) → {Promise}

Revokes a table-level permission from a user or role.
Parameters:
Name Type Description
name String Name of the user or role from which the permission will be revoked. Must be an existing user or role.
permission String Permission to revoke from the user or role. Supported values:
  • 'table_admin': Full read/write and administrative access to the table.
  • 'table_insert': Insert access to the table.
  • 'table_update': Update access to the table.
  • 'table_delete': Delete access to the table.
  • 'table_read': Read access to the table.
table_name String Name of the table to which the permission grants access. Must be an existing table, collection, or view.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

revoke_permission_table_request(request, callback) → {Promise}

Revokes a table-level permission from a user or role.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

revoke_role(role, member, options, callback) → {Promise}

Revokes membership in a role from a user or role.
Parameters:
Name Type Description
role String Name of the role in which membership will be revoked. Must be an existing role.
member String Name of the user or role that will be revoked membership in role. Must be an existing user or role.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

revoke_role_request(request, callback) → {Promise}

Revokes membership in a role from a user or role.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

show_proc(proc_name, options, callback) → {Promise}

Shows information about a proc.
Parameters:
Name Type Description
proc_name String Name of the proc to show information about. If specified, must be the name of a currently existing proc. If not specified, information about all procs will be returned.
options Object Optional parameters.
  • 'include_files': If set to true, the files that make up the proc will be returned. If set to false, the files will not be returned. Supported values:
    • 'true'
    • 'false'
    The default value is 'false'.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

show_proc_request(request, callback) → {Promise}

Shows information about a proc.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

show_proc_status(run_id, options, callback) → {Promise}

Shows the statuses of running or completed proc instances. Results are grouped by run ID (as returned from GPUdb#execute_proc) and data segment ID (each invocation of the proc command on a data segment is assigned a data segment ID).
Parameters:
Name Type Description
run_id String The run ID of a specific running or completed proc instance for which the status will be returned. If the run ID is not found, nothing will be returned. If not specified, the statuses of all running and completed proc instances will be returned.
options Object Optional parameters.
  • 'clear_complete': If set to true, if a proc instance has completed (either successfully or unsuccessfully) then its status will be cleared and no longer returned in subsequent calls. Supported values:
    • 'true'
    • 'false'
    The default value is 'false'.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

show_proc_status_request(request, callback) → {Promise}

Shows the statuses of running or completed proc instances. Results are grouped by run ID (as returned from GPUdb#execute_proc) and data segment ID (each invocation of the proc command on a data segment is assigned a data segment ID).
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

show_security(names, options, callback) → {Promise}

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.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

show_security_request(request, callback) → {Promise}

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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

show_system_properties(options, callback) → {Promise}

Returns server configuration and version related information to the caller. The 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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

show_system_properties_request(request, callback) → {Promise}

Returns server configuration and version related information to the caller. The 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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

show_system_status(options, callback) → {Promise}

Provides server configuration and health related status to the caller. The admin tool uses it to present server related information to the user.
Parameters:
Name Type Description
options Object Optional parameters, currently unused.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

show_system_status_request(request, callback) → {Promise}

Provides server configuration and health related status to the caller. The 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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

show_system_timing(options, callback) → {Promise}

Returns the last 100 database requests along with the request timing and internal job id. The admin tool uses it to present request timing information to the user.
Parameters:
Name Type Description
options Object Optional parameters, currently unused.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

show_system_timing_request(request, callback) → {Promise}

Returns the last 100 database requests along with the request timing and internal job id. The 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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

show_table(table_name, options, callback) → {Promise}

Retrieves detailed information about a table, view, or collection, specified in table_name. If the supplied table_name is a collection, the call can return information about either the collection itself or the tables and views it contains. If table_name is empty, information about all collections and top-level tables and views can be returned.

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

For a collection, setting the show_children option to false returns only information about the collection itself; setting show_children to true returns a list of tables and views contained in the collection, along with their description, type id, schema, type label, type properties, and additional information including TTL.

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 and views is returned.
options Object Optional parameters.
  • 'get_sizes': If true then the table sizes will be returned; blank, otherwise. Supported values:
    • 'true'
    • 'false'
    The default value is 'false'.
  • 'show_children': If 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 table_name is a table or view, show_children must be false. If table_name is empty, then show_children must be true. Supported values:
    • 'true'
    • 'false'
    The default value is 'true'.
  • 'no_error_if_not_exists': If false will return an error if the provided table_name does not exist. If true then it will return an empty result. Supported values:
    • 'true'
    • 'false'
    The default value is 'false'.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

show_table_metadata(table_names, options, callback) → {Promise}

Retrieves the user provided metadata for the specified tables.
Parameters:
Name Type Description
table_names Array.<String> Tables whose metadata will be fetched. All provided tables must exist, or an error is returned.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

show_table_metadata_request(request, callback) → {Promise}

Retrieves the user provided metadata for the specified tables.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

show_table_request(request, callback) → {Promise}

Retrieves detailed information about a table, view, or collection, specified in table_name. If the supplied table_name is a collection, the call can return information about either the collection itself or the tables and views it contains. If table_name is empty, information about all collections and top-level tables and views can be returned.

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

For a collection, setting the show_children option to false returns only information about the collection itself; setting show_children to true returns a list of tables and views contained in the collection, along with their description, type id, schema, type label, type properties, and additional information including TTL.

Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

show_tables_by_type(type_id, label, options, callback) → {Promise}

Gets names of the tables whose type matches the given criteria. Each table 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 GPUdb#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.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

show_tables_by_type_request(request, callback) → {Promise}

Gets names of the tables whose type matches the given criteria. Each table 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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

show_triggers(trigger_ids, options, callback) → {Promise}

Retrieves information regarding the specified triggers or all existing triggers currently active.
Parameters:
Name Type Description
trigger_ids Array.<String> List of IDs of the triggers whose information is to be retrieved. An empty list means information will be retrieved on all active triggers.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

show_triggers_request(request, callback) → {Promise}

Retrieves information regarding the specified triggers or all existing triggers currently active.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

show_types(type_id, label, options, callback) → {Promise}

Retrieves information for the specified data type. Given a type ID, the database 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 the database 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 GPUdb#create_type.
label String Option string that was supplied by user in a call to GPUdb#create_type.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

show_types_request(request, callback) → {Promise}

Retrieves information for the specified data type. Given a type ID, the database 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 the database 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.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

submit_request(endpoint, request, callbackopt) → {Promise}

Submits an arbitrary request to GPUdb. The response will be returned via the specified callback function, or via a promise if no callback function is provided.
Parameters:
Name Type Attributes Description
endpoint String The endpoint to which to submit the request.
request Object The request object to submit.
callback GPUdbCallback <optional>
The callback function.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

update_records(table_name, expressions, new_values_maps, data, options, callback) → {Promise}

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 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 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 here.
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 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 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. Supported values:
    • 'true'
    • 'false'
    The default value is 'false'.
  • 'update_on_existing_pk': Can be used to customize behavior when the updated primary key value already exists, as described in GPUdb#insert_records. Supported values:
    • 'true'
    • 'false'
    The default value is 'false'.
  • 'record_id': ID of a single record to be updated (returned in the call to GPUdb#insert_records or GPUdb#get_records_from_collection).
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

update_records_by_series(table_name, world_table_name, view_name, reserved, options, callback) → {Promise}

Updates the view specified by table_name to include full series (track) information from the world_table_name for the series (tracks) present in the view_name.
Parameters:
Name Type Description
table_name String Name of the view on which the update operation will be performed. Must be an existing view.
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.
reserved Array.<String>
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

update_records_by_series_request(request, callback) → {Promise}

Updates the view specified by table_name to include full series (track) information from the world_table_name for the series (tracks) present in the view_name.
Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

update_records_request(request, callback) → {Promise}

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

Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

visualize_video(table_names, world_table_names, track_ids, x_column_name, y_column_name, min_x, max_x, min_y, max_y, width, height, projection, bg_color, time_intervals, video_style, session_key, style_options, options, callback) → {Promise}

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 (bg_color, width, height), the collection of 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. The operation is synchronous, meaning that a response will not be returned 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 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://:9191/wms?REQUEST=GetMap&STYLES=cached&LAYERS=MY-SESSION-KEY&FRAME=0

and the last frame could be retrieved with:

http://: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.

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 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 table_names
track_ids Array.<Array.<String>> Tracks from the table_names to be rendered.
x_column_name String Name of the column containing the x coordinates.
y_column_name String Name of the column containing the y coordinates.
min_x Number Lower bound for the x values.
max_x Number Upper bound for the x values.
min_y Number Lower bound for the y values.
max_y Number Upper bound for the y values.
width Number Width of the generated image.
height Number Height of the generated image.
projection String Spatial Reference System (i.e. EPSG Code). Supported values:
  • 'EPSG:4326'
  • 'PLATE_CARREE'
  • '900913'
  • 'EPSG:900913'
  • '102100'
  • 'EPSG:102100'
  • '3857'
  • 'EPSG:3857'
  • 'WEB_MERCATOR'
The default value is 'PLATE_CARREE'.
bg_color Number Background color of the generated image.
time_intervals Array.<Array.<Number>>
video_style String
session_key String User Provided session key that is later used to retrieve the generated video from the WMS.
style_options Object Styling options for the image.
  • 'do_points': Rasterize point data toggle. Supported values:
    • 'true'
    • 'false'
    The default value is 'true'.
  • 'do_shapes': Rasterize shapes toggle. Supported values:
    • 'true'
    • 'false'
    The default value is 'true'.
  • 'do_tracks': Rasterize tracks toggle. Supported values:
    • 'true'
    • 'false'
    The default value is 'true'.
  • 'pointcolors': RGB color value in hex for the points.
  • 'pointsizes': Size of points.
  • 'pointshapes': Shape of the point. Supported values:
    • 'none'
    • 'circle'
    • 'square'
    • 'diamond'
    • 'hollowcircle'
    • 'hollowsquare'
    • 'hollowdiamond'
    • 'SYMBOLCODE'
  • 'shapelinewidths': Width of the lines.
  • 'shapelinecolors': RGB color values in hex for the line.
  • 'shapefillcolors': RGB color values in hex for the fill color of the shapes. Use '-1' for no fill.
  • 'tracklinewidths': Width of the track lines. '0' implies do not draw track lines.
  • 'tracklinecolors': RGB color values for the track lines.
  • 'trackmarkersizes': Size of the track point markers.
  • 'trackmarkercolors': Color of the track point markers.
  • 'trackmarkershapes': Shape of track point markers. Supported values:
    • 'none'
    • 'circle'
    • 'square'
    • 'diamond'
    • 'hollowcircle'
    • 'hollowsquare'
    • 'hollowdiamond'
    • 'SYMBOLCODE'
    The default value is 'none'.
  • 'trackheadcolors': Color of track head markers.
  • 'trackheadsizes': Size of track head markers.
  • 'trackheadshapes': Shape of track head markers. Supported values:
    • 'none'
    • 'circle'
    • 'square'
    • 'diamond'
    • 'hollowcircle'
    • 'hollowsquare'
    • 'hollowdiamond'
    • 'SYMBOLCODE'
    The default value is 'circle'.
options Object Optional parameters.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

visualize_video_request(request, callback) → {Promise}

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 (bg_color, width, height), the collection of 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. The operation is synchronous, meaning that a response will not be returned 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 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://:9191/wms?REQUEST=GetMap&STYLES=cached&LAYERS=MY-SESSION-KEY&FRAME=0

and the last frame could be retrieved with:

http://: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.

Parameters:
Name Type Description
request Object Request object containing the parameters for the operation.
callback GPUdbCallback Callback that handles the response.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

wms_request(request, callbackopt) → {Promise}

Request a WMS (Web Map Service) rasterized image. The image will be returned as a Node.js Buffer object via the specified callback function, or via a promise if no callback function is provided.
Parameters:
Name Type Attributes Description
request Object Object containing WMS parameters.
callback GPUdbCallback <optional>
The callback function.
Source:
Returns:
A promise that will be fulfilled with the image, if no callback function is provided.
Type
Promise