aggregate_unique
- aggregate_unique(
table_name: string,
column_name: string,
offset?: number,
limit?: number,
options?: Record<string, string>,
callback?: GPUdbCallback,
): Promise<AggregateUniqueResponse>Parameters
- table_name: string
Name of an existing table or view on which the operation will be performed, in [schema_name.]table_name format, using standard name resolution rules.
- column_name: string
Name of the column or an expression containing one or more column names on which the unique function would be applied.
Optionaloffset: numberA positive integer indicating the number of initial results to skip (this can be useful for paging through the results).
Optionallimit: numberA positive integer indicating the maximum number of results to be returned, or END_OF_SET (-9999) to indicate that the maximum number of results allowed by the server should be returned. The number of records returned will never exceed the server’s own limit, defined by the max_get_records_size parameter in the server configuration. Use
has_more_recordsto see if more records exist in the result to be fetched, andoffsetandlimitto request subsequent pages of results.Optionaloptions: Record<string, string>Optional parameters.
Optionalcallback: GPUdbCallbackOptional callback function
Returns Promise<AggregateUniqueResponse>
Promise<Types.AggregateUniqueResponse> - Promise resolving to the response
- Defined in src/GPUdb.ts:3635
- table_name: string
aggregate_unique_request
- aggregate_unique_request(
request: AggregateUniqueRequest,
callback?: GPUdbCallback,
): Promise<AggregateUniqueResponse>Returns all the unique values from a particular column (specified by
column_name) of a particular table or view (specified bytable_name). Ifcolumn_nameis a numeric column, the values will be inbinary_encoded_response. Otherwise ifcolumn_nameis a string column, the values will be injson_encoded_response. The results can be paged viaoffsetandlimitparameters.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. Both the table name and resulting column name must adhere to standard naming conventions; any column expression will need to be aliased. If the source table’s shard key is used as thecolumn_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. Not available if the value ofcolumn_nameis an unrestricted-length string.Parameters
- request: AggregateUniqueRequest
Request object containing the parameters for the operation
Optionalcallback: GPUdbCallbackOptional callback function
Returns Promise<AggregateUniqueResponse>
Promise<Types.AggregateUniqueResponse> - Promise resolving to the response
- Defined in src/GPUdb.ts:3573
- request: AggregateUniqueRequest
Returns all the unique values from a particular column (specified by
column_name) of a particular table or view (specified bytable_name). Ifcolumn_nameis a numeric column, the values will be inbinary_encoded_response. Otherwise ifcolumn_nameis a string column, the values will be injson_encoded_response. The results can be paged viaoffsetandlimitparameters.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. Both the table name and resulting column name must adhere to standard naming conventions; any column expression will need to be aliased. If the source table’s shard key is used as thecolumn_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. Not available if the value ofcolumn_nameis an unrestricted-length string.