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

A set of parameters for /create/projection. More...

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

Classes

struct  Options
 Optional parameters. More...
 

Public Member Functions

 CreateProjectionRequest ()
 Constructs a CreateProjectionRequest object with default parameters. More...
 
 CreateProjectionRequest (string table_name, string projection_name, IList< string > column_names, IDictionary< string, string > options=null)
 Constructs a CreateProjectionRequest 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 existing table on which the projection is to be applied. More...
 
string projection_name [get, set]
 Name of the projection to be created. More...
 
IList< string > column_names [get, set]
 List of columns from to be included in the projection. More...
 
IDictionary< string, string > options = new List<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 /create/projection.


Creates a new projection of an existing table. A projection represents a subset of the columns (potentially including derived columns) of a table.
Notes:
A moving average can be calculated on a given column using the following syntax in the <member name="column_names"> parameter:
'moving_average(column_name,num_points_before,num_points_after) as new_column_name'
For each record in the moving_average function's '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.
Also, a projection can be created with a different shard key than the source table. By specifying shard_key, the projection will be sharded according to the specified columns, regardless of how the source table is sharded. The source table can even be unsharded or replicated.

Definition at line 45 of file CreateProjection.cs.

Constructor & Destructor Documentation

kinetica.CreateProjectionRequest.CreateProjectionRequest ( )
inline

Constructs a CreateProjectionRequest object with default parameters.

Definition at line 251 of file CreateProjection.cs.

kinetica.CreateProjectionRequest.CreateProjectionRequest ( string  table_name,
string  projection_name,
IList< string >  column_names,
IDictionary< string, string >  options = null 
)
inline

Constructs a CreateProjectionRequest object with the specified parameters.

Parameters
table_nameName of the existing table on which the projection is to be applied.
projection_nameName of the projection to be created. Has the same naming restrictions as tables.
column_namesList of columns from to be included in the projection. Can include derived columns. Can be specified as aliased via the syntax 'column_name as alias'.
optionsOptional 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 . 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. Values: true, false.
  • ttl Sets the TTL of the table, view, or collection specified in . The value must be the desired TTL in minutes.
  • shard_key Comma-separated list of the columns to be sharded on; e.g. 'column1, column2'. The columns specified must be present in . If any alias is given for any column name, the alias must be used, rather than the original column name.
  • persist If true then the projection 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 projection will be a read-only, memory-only temporary table. Values: true, false.

Definition at line 329 of file CreateProjection.cs.

Property Documentation

IList<string> kinetica.CreateProjectionRequest.column_names
getset

List of columns from to be included in the projection.

Can include derived columns. Can be specified as aliased via the syntax 'column_name as alias'.

Definition at line 182 of file CreateProjection.cs.

IDictionary<string, string> kinetica.CreateProjectionRequest.options = new List<string>()
getset

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 . 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. Values: true, false.
  • ttl Sets the TTL of the table, view, or collection specified in . The value must be the desired TTL in minutes.
  • shard_key Comma-separated list of the columns to be sharded on; e.g. 'column1, column2'. The columns specified must be present in . If any alias is given for any column name, the alias must be used, rather than the original column name.
  • persist If true then the projection 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 projection will be a read-only, memory-only temporary table. Values: true, false.

Definition at line 246 of file CreateProjection.cs.

string kinetica.CreateProjectionRequest.projection_name
getset

Name of the projection to be created.

Has the same naming restrictions as tables.

Definition at line 176 of file CreateProjection.cs.

string kinetica.CreateProjectionRequest.table_name
getset

Name of the existing table on which the projection is to be applied.

Definition at line 171 of file CreateProjection.cs.


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