Skip to main content

◆ createProjection() [1/4]

CreateProjectionResponse gpudb::GPUdb::createProjection (const CreateProjectionRequest &request_) const

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 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)).

Parameters
[in]request_Request object containing the parameters for the operation.
Returns
Response object containing the result of the operation.

◆ createProjection() [2/4]

CreateProjectionResponse & gpudb::GPUdb::createProjection (const CreateProjectionRequest &request_,
CreateProjectionResponse &response_ ) const

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 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)).

Parameters
[in]request_Request object containing the parameters for the operation.
[out]response_Response object containing the results of the operation.
Returns
Response object containing the result of the operation (initially passed in by reference).

◆ createProjection() [3/4]

CreateProjectionResponse gpudb::GPUdb::createProjection (const std::string &tableName,
const std::string &projectionName,
const std::vector< std::string > &columnNames,
const std::map< std::string, std::string > &options ) const

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 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)).

Parameters
[in]tableNameName 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]projectionNameName of the projection to be created, in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria.
[in]columnNamesList 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]optionsOptional parameters.The default value is an empty map.
Returns
Response object containing the result of the operation.

◆ createProjection() [4/4]

CreateProjectionResponse & gpudb::GPUdb::createProjection (const std::string &tableName,
const std::string &projectionName,
const std::vector< std::string > &columnNames,
const std::map< std::string, std::string > &options,
CreateProjectionResponse &response_ ) const

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 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)).

Parameters
[in]tableNameName 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]projectionNameName of the projection to be created, in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria.
[in]columnNamesList 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]optionsOptional parameters.The default value is an empty map.
[out]response_Response object containing the results of the operation.
Returns
Response object containing the result of the operation (initially passed in by reference).