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

A set of parameters for Kinetica.aggregateGroupBy(string,IList{string},long,long,IDictionary{string, string}). 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=null, long?limit=null, IDictionary< string, string > options=null)
 Constructs an AggregateGroupByRequest object with the specified parameters. More...
 
 AggregateGroupByRequest (string table_name, IList< string > column_names, long?offset=null, long?limit=null, 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 an existing table or view 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 = 0 [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 = -9999 [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 Kinetica.aggregateGroupBy(string,IList{string},long,long,IDictionary{string, string}).


Calculates unique combinations (groups) of values for the given columns in a given table or view and computes aggregates on each unique combination. This is somewhat analogous to an SQL-style SELECT...GROUP BY.
For aggregation details and examples, see Aggregation. For limitations, see Aggregation Limitations.
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 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.
Available grouping functions are Rollup, Cube, and Grouping Sets
This service also provides support for Pivot operations.
Filtering on aggregates is supported via expressions using aggregation functions supplied to having.
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 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) and all result records are selected (offset is 0 and limit is -9999), 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 column_names is an unrestricted-length string.

Definition at line 86 of file AggregateGroupBy.cs.

Constructor & Destructor Documentation

kinetica.AggregateGroupByRequest.AggregateGroupByRequest ( )
inline

Constructs an AggregateGroupByRequest object with default parameters.

Definition at line 866 of file AggregateGroupBy.cs.

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

Constructs an AggregateGroupByRequest object with the specified parameters.

Parameters
table_nameName of an existing table or view on which the operation will be performed.
column_namesList of one or more column names, expressions, and aggregate expressions.
offsetA positive integer indicating the number of initial results to skip (this can be useful for paging through the results). The default value is 0.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. 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 <member name="has_more_records"> to see if more records exist in the result to be fetched, and & to request subsequent pages of results. The default value is -9999.
optionsOptional parameters.
  • COLLECTION_NAME: Name of a collection which is to contain the table specified in result_table. If the collection provided is non-existent, the collection will be automatically created. If empty, then the table will be a top-level table.
  • 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 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 and will not expire unless a ttl is specified. If false, then the result table will be an in-memory table and will expire unless a ttl is specified otherwise. Supported values: The default value is FALSE.
  • RESULT_TABLE_FORCE_REPLICATED: Force the result table to be replicated (ignores any sharding). Must be used in combination with the result_table option. Supported values: The default value is FALSE.
  • RESULT_TABLE_GENERATE_PK: If true then set a primary key for the result table. Must be used in combination with the result_table option. Supported values: The default value is FALSE.
  • TTL: Sets the TTL of the table specified in result_table.
  • CHUNK_SIZE: Indicates the number of records per chunk to be used for the result table. Must be used in combination with the result_table option.
  • CREATE_INDEXES: Comma-separated list of columns on which to create indexes on the result table. Must be used in combination with the result_table option.
  • VIEW_ID: ID of view of which the result table will be a member. The default value is ''.
  • MATERIALIZE_ON_GPU: No longer used. See Resource Management Concepts for information about how resources are managed, Tier Strategy Concepts for how resources are targeted for VRAM, and Tier Strategy Usage for how to specify a table's priority in VRAM. Supported values: The default value is FALSE.
  • PIVOT: pivot column
  • PIVOT_VALUES: The value list provided will become the column headers in the output. Should be the values from the pivot_column.
  • GROUPING_SETS: Customize the grouping attribute sets to compute the aggregates. These sets can include ROLLUP or CUBE operartors. The attribute sets should be enclosed in paranthesis and can include composite attributes. All attributes specified in the grouping sets must present in the groupby attributes.
  • ROLLUP: This option is used to specify the multilevel aggregates.
  • CUBE: This option is used to specify the multidimensional aggregates.
The default value is an empty Dictionary.

Definition at line 1125 of file AggregateGroupBy.cs.

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

Constructs an AggregateGroupByRequest object with the specified parameters.

Parameters
table_nameName of an existing table or view on which the operation will be performed.
column_namesList of one or more column names, expressions, and aggregate expressions.
offsetA positive integer indicating the number of initial results to skip (this can be useful for paging through the results). The default value is 0.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. 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 <member name="has_more_records"> to see if more records exist in the result to be fetched, and & to request subsequent pages of results. The default value is -9999.
encodingSpecifies the encoding for returned records. Supported values:
  • BINARY: Indicates that the returned records should be binary encoded.
  • JSON: Indicates that the returned records should be json encoded.
The default value is BINARY.
optionsOptional parameters.
  • COLLECTION_NAME: Name of a collection which is to contain the table specified in result_table. If the collection provided is non-existent, the collection will be automatically created. If empty, then the table will be a top-level table.
  • 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 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 and will not expire unless a ttl is specified. If false, then the result table will be an in-memory table and will expire unless a ttl is specified otherwise. Supported values: The default value is FALSE.
  • RESULT_TABLE_FORCE_REPLICATED: Force the result table to be replicated (ignores any sharding). Must be used in combination with the result_table option. Supported values: The default value is FALSE.
  • RESULT_TABLE_GENERATE_PK: If true then set a primary key for the result table. Must be used in combination with the result_table option. Supported values: The default value is FALSE.
  • TTL: Sets the TTL of the table specified in result_table.
  • CHUNK_SIZE: Indicates the number of records per chunk to be used for the result table. Must be used in combination with the result_table option.
  • CREATE_INDEXES: Comma-separated list of columns on which to create indexes on the result table. Must be used in combination with the result_table option.
  • VIEW_ID: ID of view of which the result table will be a member. The default value is ''.
  • MATERIALIZE_ON_GPU: No longer used. See Resource Management Concepts for information about how resources are managed, Tier Strategy Concepts for how resources are targeted for VRAM, and Tier Strategy Usage for how to specify a table's priority in VRAM. Supported values: The default value is FALSE.
  • PIVOT: pivot column
  • PIVOT_VALUES: The value list provided will become the column headers in the output. Should be the values from the pivot_column.
  • GROUPING_SETS: Customize the grouping attribute sets to compute the aggregates. These sets can include ROLLUP or CUBE operartors. The attribute sets should be enclosed in paranthesis and can include composite attributes. All attributes specified in the grouping sets must present in the groupby attributes.
  • ROLLUP: This option is used to specify the multilevel aggregates.
  • CUBE: This option is used to specify the multidimensional aggregates.
The default value is an empty Dictionary.

Definition at line 1416 of file AggregateGroupBy.cs.

Property Documentation

IList<string> kinetica.AggregateGroupByRequest.column_names
getset

List of one or more column names, expressions, and aggregate expressions.

Definition at line 585 of file AggregateGroupBy.cs.

string kinetica.AggregateGroupByRequest.encoding = -9999
getset

Specifies the encoding for returned records.

Supported values:

  • BINARY: Indicates that the returned records should be binary encoded.
  • JSON: Indicates that the returned records should be json encoded.

The default value is BINARY.

Definition at line 625 of file AggregateGroupBy.cs.

long kinetica.AggregateGroupByRequest.limit = 0
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.

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 <member name="has_more_records"> to see if more records exist in the result to be fetched, and & to request subsequent pages of results. The default value is -9999.

Definition at line 604 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 default value is 0.The minimum allowed value is 0. The maximum allowed value is MAX_INT.

Definition at line 591 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. If the collection provided is non-existent, the collection will be automatically created. If empty, then the table will be a top-level table.
  • 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 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 and will not expire unless a ttl is specified. If false, then the result table will be an in-memory table and will expire unless a ttl is specified otherwise. Supported values: The default value is FALSE.
  • RESULT_TABLE_FORCE_REPLICATED: Force the result table to be replicated (ignores any sharding). Must be used in combination with the result_table option. Supported values: The default value is FALSE.
  • RESULT_TABLE_GENERATE_PK: If true then set a primary key for the result table. Must be used in combination with the result_table option. Supported values: The default value is FALSE.
  • TTL: Sets the TTL of the table specified in result_table.
  • CHUNK_SIZE: Indicates the number of records per chunk to be used for the result table. Must be used in combination with the result_table option.
  • CREATE_INDEXES: Comma-separated list of columns on which to create indexes on the result table. Must be used in combination with the result_table option.
  • VIEW_ID: ID of view of which the result table will be a member. The default value is ''.
  • MATERIALIZE_ON_GPU: No longer used. See Resource Management Concepts for information about how resources are managed, Tier Strategy Concepts for how resources are targeted for VRAM, and Tier Strategy Usage for how to specify a table's priority in VRAM. Supported values: The default value is FALSE.
  • PIVOT: pivot column
  • PIVOT_VALUES: The value list provided will become the column headers in the output. Should be the values from the pivot_column.
  • GROUPING_SETS: Customize the grouping attribute sets to compute the aggregates. These sets can include ROLLUP or CUBE operartors. The attribute sets should be enclosed in paranthesis and can include composite attributes. All attributes specified in the grouping sets must present in the groupby attributes.
  • ROLLUP: This option is used to specify the multilevel aggregates.
  • CUBE: This option is used to specify the multidimensional aggregates.

The default value is an empty Dictionary.

Definition at line 861 of file AggregateGroupBy.cs.

string kinetica.AggregateGroupByRequest.table_name
getset

Name of an existing table or view on which the operation will be performed.

Definition at line 581 of file AggregateGroupBy.cs.


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