GPUdb C++ API  Version 7.2.2.4
gpudb::CreateProjectionRequest Struct Reference

A set of parameters for GPUdb::createProjection. More...

#include <gpudb/protocol/create_projection.h>

Public Member Functions

 CreateProjectionRequest ()
 Constructs a CreateProjectionRequest object with default parameters. 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
 Name of the existing table on which the projection is to be applied, in [ schema_name. ]table_name format, using standard name resolution rules. More...
 
std::string projectionName
 Name of the projection to be created, in [ schema_name. ]table_name format, using standard name resolution rules and meeting table naming criteria. More...
 
std::vector< std::string > columnNames
 List of columns from tableName to be included in the projection. More...
 
std::map< std::string, std::string > options
 Optional parameters. More...
 

Detailed Description

A set of parameters for GPUdb::createProjection.

Creates a new projection of an existing table. A projection represents a subset of the columns (potentially including derived columns) of a table.

For projection details and examples, see Projections. For limitations, see Projection Limitations and Cautions.

Window functions, which can perform operations like moving averages, are available through this endpoint as well as GPUdb::getRecordsByColumn.

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.

If tableName is empty, selection is performed against a single-row virtual table. This can be useful in executing temporal (NOW()), identity (USER()), or constant-based functions (GEODIST(-77.11, 38.88, -71.06, 42.36)).

Definition at line 49 of file create_projection.h.

Constructor & Destructor Documentation

◆ CreateProjectionRequest() [1/2]

gpudb::CreateProjectionRequest::CreateProjectionRequest ( )
inline

Constructs a CreateProjectionRequest object with default parameters.

Definition at line 54 of file create_projection.h.

◆ CreateProjectionRequest() [2/2]

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 [schema_name.]table_name format, using standard name resolution rules. An empty table name creates a projection from a single-row virtual table, where columns specified should be constants or constant expressions.
[in]projectionName_Name of the projection to be created, in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria.
[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. The default value is an empty map.

Definition at line 411 of file create_projection.h.

Member Data Documentation

◆ columnNames

std::vector<std::string> gpudb::CreateProjectionRequest::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'.

Definition at line 444 of file create_projection.h.

◆ options

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

Optional parameters.

The default value is an empty map.

Definition at line 672 of file create_projection.h.

◆ projectionName

std::string gpudb::CreateProjectionRequest::projectionName

Name of the projection to be created, in [ schema_name. ]table_name format, using standard name resolution rules and meeting table naming criteria.

Definition at line 437 of file create_projection.h.

◆ tableName

std::string gpudb::CreateProjectionRequest::tableName

Name of the existing table on which the projection is to be applied, in [ schema_name. ]table_name format, using standard name resolution rules.

An empty table name creates a projection from a single-row virtual table, where columns specified should be constants or constant expressions.

Definition at line 427 of file create_projection.h.


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