GPUdb C++ API  Version 6.0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
gpudb::CreateProjectionRequest Struct Reference

A set of input parameters for const. More...

#include <gpudb/protocol/create_projection.h>

Public Member Functions

 CreateProjectionRequest ()
 Constructs a CreateProjectionRequest object with default parameter values. More...
 
 CreateProjectionRequest (const std::string &tableName_, const std::string &projectionName_, const std::vector< std::string > &columnNames_, const std::map< std::string, std::string > &options_)
 Constructs a CreateProjectionRequest object with the specified parameters. More...
 

Public Attributes

std::string tableName
 
std::string projectionName
 
std::vector< std::string > columnNames
 
std::map< std::string,
std::string > 
options
 

Detailed Description

A set of input parameters for const.

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 columnNames 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 44 of file create_projection.h.

Constructor & Destructor Documentation

gpudb::CreateProjectionRequest::CreateProjectionRequest ( )
inline

Constructs a CreateProjectionRequest object with default parameter values.

Definition at line 51 of file create_projection.h.

gpudb::CreateProjectionRequest::CreateProjectionRequest ( const std::string &  tableName_,
const std::string &  projectionName_,
const std::vector< std::string > &  columnNames_,
const std::map< std::string, std::string > &  options_ 
)
inline

Constructs a CreateProjectionRequest object with the specified parameters.

Parameters
[in]tableName_Name of the existing table on which the projection is to be applied.
[in]projectionName_Name of the projection to be created. Has the same naming restrictions as tables.
[in]columnNames_List of columns from tableName to be included in the projection. Can include derived columns. Can be specified as aliased via the syntax 'column_name as alias'.
[in]options_Optional parameters.

Definition at line 133 of file create_projection.h.

Member Data Documentation

std::vector<std::string> gpudb::CreateProjectionRequest::columnNames

Definition at line 143 of file create_projection.h.

std::map<std::string, std::string> gpudb::CreateProjectionRequest::options

Definition at line 144 of file create_projection.h.

std::string gpudb::CreateProjectionRequest::projectionName

Definition at line 142 of file create_projection.h.

std::string gpudb::CreateProjectionRequest::tableName

Definition at line 141 of file create_projection.h.


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