Kinetica   C#   API  Version 7.2.3.0
kinetica.AggregateStatisticsRequest Class Reference

A set of parameters for Kinetica.aggregateStatistics. More...

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

Classes

struct  Options
 A set of string constants for the parameter options. More...
 
struct  Stats
 A set of string constants for the parameter stats. More...
 

Public Member Functions

 AggregateStatisticsRequest ()
 Constructs an AggregateStatisticsRequest object with default parameters. More...
 
 AggregateStatisticsRequest (string table_name, string column_name, string stats, IDictionary< string, string > options=null)
 Constructs an AggregateStatisticsRequest 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 statistics operation will be performed, in [schema_name. More...
 
string column_name [get, set]
 Name of the primary column for which the statistics are to be calculated. More...
 
string stats [get, set]
 Comma separated list of the statistics to calculate, e.g. More...
 
IDictionary< string, string > options = new Dictionary<string, string>() [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.aggregateStatistics.

Calculates the requested statistics of the given column(s) 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)').

A second, comma-separated value can be added to the PERCENTILE statistic to calculate percentile resolution, e.g., a 50th percentile with 200 resolution would be 'percentile(50,200)'.

The weighted average statistic requires a weight column to be specified in WEIGHT_COLUMN_NAME. The weighted average is then defined as the sum of the products of column_name times the WEIGHT_COLUMN_NAME values divided by the sum of the WEIGHT_COLUMN_NAME values.

Additional columns can be used in the calculation of statistics via ADDITIONAL_COLUMN_NAMES. Values in these columns will be included in the overall aggregate calculation–individual aggregates will not be calculated per additional column. For instance, requesting the COUNT & MEAN of column_name x and ADDITIONAL_COLUMN_NAMES y & z, where x holds the numbers 1-10, y holds 11-20, and z holds 21-30, would return the total number of x, y, & z values (30), and the single average value across all x, y, & z values (15.5).

The response includes a list of key/value pairs of each statistic requested and its corresponding value.

Definition at line 63 of file AggregateStatistics.cs.

Constructor & Destructor Documentation

◆ AggregateStatisticsRequest() [1/2]

kinetica.AggregateStatisticsRequest.AggregateStatisticsRequest ( )
inline

Constructs an AggregateStatisticsRequest object with default parameters.

Definition at line 273 of file AggregateStatistics.cs.

◆ AggregateStatisticsRequest() [2/2]

kinetica.AggregateStatisticsRequest.AggregateStatisticsRequest ( string  table_name,
string  column_name,
string  stats,
IDictionary< string, string >  options = null 
)
inline

Constructs an AggregateStatisticsRequest object with the specified parameters.

Parameters
table_nameName of the table on which the statistics operation will be performed, in [schema_name.]table_name format, using standard name resolution rules.
column_nameName of the primary column for which the statistics are to be calculated.
statsComma separated list of the statistics to calculate, e.g. "sum,mean". Supported values:
  • COUNT: Number of objects (independent of the given column(s)).
  • 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(s).
  • MIN: Minimum value of the column(s).
  • MAX: Maximum value of the column(s).
  • WEIGHTED_AVERAGE: Weighted arithmetic mean (using the option WEIGHT_COLUMN_NAME as the weighting column).
  • CARDINALITY: Number of unique values in the column(s).
  • ESTIMATED_CARDINALITY: Estimate (via hyperloglog technique) of the number of unique values in the column(s).
  • PERCENTILE: Estimate (via t-digest) of the given percentile of the column(s) (percentile(50.0) will be an approximation of the median). Add a second, comma-separated value to calculate percentile resolution, e.g., 'percentile(75,150)'
  • PERCENTILE_RANK: Estimate (via t-digest) of the percentile rank of the given value in the column(s) (if the given value is the median of the column(s), percentile_rank(<median>) will return approximately 50.0).
optionsOptional parameters.
  • ADDITIONAL_COLUMN_NAMES: A list of comma separated column names over which statistics can be accumulated along with the primary column. All columns listed and column_name must be of the same type. Must not include the column specified in column_name and no column can be listed twice.
  • WEIGHT_COLUMN_NAME: Name of column used as weighting attribute for the weighted average statistic.
The default value is an empty Dictionary.

Definition at line 395 of file AggregateStatistics.cs.

Property Documentation

◆ column_name

string kinetica.AggregateStatisticsRequest.column_name
getset

Name of the primary column for which the statistics are to be calculated.

Definition at line 156 of file AggregateStatistics.cs.

◆ options

IDictionary<string, string> kinetica.AggregateStatisticsRequest.options = new Dictionary<string, string>()
getset

Optional parameters.

  • ADDITIONAL_COLUMN_NAMES: A list of comma separated column names over which statistics can be accumulated along with the primary column. All columns listed and column_name must be of the same type. Must not include the column specified in column_name and no column can be listed twice.
  • WEIGHT_COLUMN_NAME: Name of column used as weighting attribute for the weighted average statistic.

The default value is an empty Dictionary.

Definition at line 269 of file AggregateStatistics.cs.

◆ stats

string kinetica.AggregateStatisticsRequest.stats
getset

Comma separated list of the statistics to calculate, e.g.

"sum,mean".

Supported values:

  • COUNT: Number of objects (independent of the given column(s)).
  • 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(s).
  • MIN: Minimum value of the column(s).
  • MAX: Maximum value of the column(s).
  • WEIGHTED_AVERAGE: Weighted arithmetic mean (using the option WEIGHT_COLUMN_NAME as the weighting column).
  • CARDINALITY: Number of unique values in the column(s).
  • ESTIMATED_CARDINALITY: Estimate (via hyperloglog technique) of the number of unique values in the column(s).
  • PERCENTILE: Estimate (via t-digest) of the given percentile of the column(s) (percentile(50.0) will be an approximation of the median). Add a second, comma-separated value to calculate percentile resolution, e.g., 'percentile(75,150)'
  • PERCENTILE_RANK: Estimate (via t-digest) of the percentile rank of the given value in the column(s) (if the given value is the median of the column(s), percentile_rank(<median>) will return approximately 50.0).

Definition at line 245 of file AggregateStatistics.cs.

◆ table_name

string kinetica.AggregateStatisticsRequest.table_name
getset

Name of the table on which the statistics operation will be performed, in [schema_name.

]table_name format, using standard name resolution rules.

Definition at line 152 of file AggregateStatistics.cs.


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