Kinetica C# API  Version 6.0.1.0
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Pages
kinetica.AggregateGroupByRequest Class Reference

A set of parameters for /aggregate/groupby. More...

+ Inheritance diagram for kinetica.AggregateGroupByRequest:
+ Collaboration diagram for kinetica.AggregateGroupByRequest:

Classes

struct  Encoding
 Specifies the encoding for returned records. More...
 
struct  Options
 Optional parameters. More...
 

Public Member Functions

 AggregateGroupByRequest ()
 Constructs an AggregateGroupByRequest object with default parameters. More...
 
 AggregateGroupByRequest (string table_name, IList< string > column_names, long offset, long limit=1000, IDictionary< string, string > options=null)
 Constructs an AggregateGroupByRequest object with the specified parameters. More...
 
 AggregateGroupByRequest (string table_name, IList< string > column_names, long offset, long limit=1000, string encoding=null, IDictionary< string, string > options=null)
 Constructs an AggregateGroupByRequest object with the specified parameters. More...
 
- Public Member Functions inherited from kinetica.KineticaData
 KineticaData (KineticaType type)
 Constructor from Kinetica Type More...
 
 KineticaData (System.Type type=null)
 Default constructor, with optional System.Type More...
 
object Get (int fieldPos)
 Retrieve a specific property from this object More...
 
void Put (int fieldPos, object fieldValue)
 Write a specific property to this object More...
 

Properties

string table_name [get, set]
 Name of the table on which the operation will be performed. More...
 
IList< string > column_names [get, set]
 List of one or more column names, expressions, and aggregate expressions. More...
 
long offset = new List<string>() [get, set]
 A positive integer indicating the number of initial results to skip (this can be useful for paging through the results). More...
 
long limit [get, set]
 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. More...
 
string encoding = 1000 [get, set]
 Specifies the encoding for returned records. More...
 
IDictionary< string, string > options = Encoding.BINARY [get, set]
 Optional parameters. More...
 
- Properties inherited from kinetica.KineticaData
Schema Schema [get]
 Avro Schema for this class More...
 

Additional Inherited Members

- Static Public Member Functions inherited from kinetica.KineticaData
static RecordSchema SchemaFromType (System.Type t, KineticaType ktype=null)
 Create an Avro Schema from a System.Type and a KineticaType. More...
 

Detailed Description

A set of parameters for /aggregate/groupby.


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; columns marked as store-only are unable to be used in grouping or aggregation.
The results can be paged via the <member name="offset"> and <member name="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"}.
<member name="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 <member name="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 names must adhere to standard naming conventions; column/aggregation expressions will need to be aliased. 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. Not available when any of the values of <member name="column_names"> is an unrestricted-length string.

Definition at line 66 of file AggregateGroupBy.cs.

Constructor & Destructor Documentation

kinetica.AggregateGroupByRequest.AggregateGroupByRequest ( )
inline

Constructs an AggregateGroupByRequest object with default parameters.

Definition at line 330 of file AggregateGroupBy.cs.

kinetica.AggregateGroupByRequest.AggregateGroupByRequest ( string  table_name,
IList< string >  column_names,
long  offset,
long  limit = 1000,
IDictionary< string, string >  options = null 
)
inline

Constructs an AggregateGroupByRequest object with the specified parameters.

Parameters
table_nameName of the table on which the operation will be performed. Must be an existing table/view/collection.
column_namesList 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.
offsetA positive integer indicating the number of initial results to skip (this can be useful for paging through the results). The minimum allowed value is 0. The maximum allowed value is MAX_INT.
limitA 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.
optionsOptional 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 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. Values: ascending, descending.
  • sort_by String determining how the results are sorted. Values: key, value.
  • result_table The name of the table used to store the results. 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.
  • result_table_persist If true then the result table specified in result_table will be persisted as a regular table (it will not be automatically cleared unless a ttl is provided, and the table data can be modified in subsequent operations). If false then the result table will be a read-only, memory-only temporary table. Values: true, false.
  • ttl Sets the TTL of the table specified in result_table. The value must be the desired TTL in minutes.

Definition at line 414 of file AggregateGroupBy.cs.

kinetica.AggregateGroupByRequest.AggregateGroupByRequest ( string  table_name,
IList< string >  column_names,
long  offset,
long  limit = 1000,
string  encoding = null,
IDictionary< string, string >  options = null 
)
inline

Constructs an AggregateGroupByRequest object with the specified parameters.

Parameters
table_nameName of the table on which the operation will be performed. Must be an existing table/view/collection.
column_namesList 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.
offsetA positive integer indicating the number of initial results to skip (this can be useful for paging through the results). The minimum allowed value is 0. The maximum allowed value is MAX_INT.
limitA 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.
encodingSpecifies the encoding for returned records. Values: binary, json.
optionsOptional 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 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. Values: ascending, descending.
  • sort_by String determining how the results are sorted. Values: key, value.
  • result_table The name of the table used to store the results. 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.
  • result_table_persist If true then the result table specified in result_table will be persisted as a regular table (it will not be automatically cleared unless a ttl is provided, and the table data can be modified in subsequent operations). If false then the result table will be a read-only, memory-only temporary table. Values: true, false.
  • ttl Sets the TTL of the table specified in result_table. The value must be the desired TTL in minutes.

Definition at line 514 of file AggregateGroupBy.cs.

Property Documentation

IList<string> kinetica.AggregateGroupByRequest.column_names
getset

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.

Definition at line 243 of file AggregateGroupBy.cs.

string kinetica.AggregateGroupByRequest.encoding = 1000
getset

Specifies the encoding for returned records.

Values: binary, json.

Definition at line 259 of file AggregateGroupBy.cs.

long kinetica.AggregateGroupByRequest.limit
getset

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.

Definition at line 254 of file AggregateGroupBy.cs.

long kinetica.AggregateGroupByRequest.offset = new List<string>()
getset

A positive integer indicating the number of initial results to skip (this can be useful for paging through the results).

The minimum allowed value is 0. The maximum allowed value is MAX_INT.

Definition at line 249 of file AggregateGroupBy.cs.

IDictionary<string, string> kinetica.AggregateGroupByRequest.options = Encoding.BINARY
getset

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 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. Values: ascending, descending.
  • sort_by String determining how the results are sorted. Values: key, value.
  • result_table The name of the table used to store the results. 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.
  • result_table_persist If true then the result table specified in result_table will be persisted as a regular table (it will not be automatically cleared unless a ttl is provided, and the table data can be modified in subsequent operations). If false then the result table will be a read-only, memory-only temporary table. Values: true, false.
  • ttl Sets the TTL of the table specified in result_table. The value must be the desired TTL in minutes.

Definition at line 325 of file AggregateGroupBy.cs.

string kinetica.AggregateGroupByRequest.table_name
getset

Name of the table on which the operation will be performed.

Must be an existing table/view/collection.

Definition at line 237 of file AggregateGroupBy.cs.


The documentation for this class was generated from the following file: