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

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

#include <gpudb/protocol/aggregate_unpivot.h>

Public Member Functions

 AggregateUnpivotRequest ()
 Constructs an AggregateUnpivotRequest object with default parameters. More...
 
 AggregateUnpivotRequest (const std::string &tableName_, const std::vector< std::string > &columnNames_, const std::string &variableColumnName_, const std::string &valueColumnName_, const std::vector< std::string > &pivotedColumns_, const std::map< std::string, std::string > &options_)
 Constructs an AggregateUnpivotRequest object with the specified parameters. More...
 
 AggregateUnpivotRequest (const std::string &tableName_, const std::vector< std::string > &columnNames_, const std::string &variableColumnName_, const std::string &valueColumnName_, const std::vector< std::string > &pivotedColumns_, const std::string &encoding_, const std::map< std::string, std::string > &options_)
 Constructs an AggregateUnpivotRequest object with the specified parameters. More...
 

Public Attributes

std::string tableName
 Name of the table on which the operation will be performed. More...
 
std::vector< std::string > columnNames
 List of column names or expressions. More...
 
std::string variableColumnName
 Specifies the variable/parameter column name. More...
 
std::string valueColumnName
 Specifies the value column name. More...
 
std::vector< std::string > pivotedColumns
 List of one or more values typically the column names of the input table. More...
 
std::string encoding
 Specifies the encoding for returned records. More...
 
std::map< std::string, std::string > options
 Optional parameters. More...
 

Detailed Description

A set of parameters for GPUdb::aggregateUnpivot.

Rotate the column values into rows values.

For unpivot details and examples, see Unpivot. For limitations, see Unpivot Limitations.

Unpivot is used to normalize tables that are built for cross tabular reporting purposes. The unpivot operator rotates the column values for all the pivoted columns. A variable column, value column and all columns from the source table except the unpivot columns are projected into the result table. The variable column and value columns in the result table indicate the pivoted column name and values respectively.

The response is returned as a dynamic schema. For details see: dynamic schemas documentation.

Definition at line 36 of file aggregate_unpivot.h.

Constructor & Destructor Documentation

◆ AggregateUnpivotRequest() [1/3]

gpudb::AggregateUnpivotRequest::AggregateUnpivotRequest ( )
inline

Constructs an AggregateUnpivotRequest object with default parameters.

Definition at line 42 of file aggregate_unpivot.h.

◆ AggregateUnpivotRequest() [2/3]

gpudb::AggregateUnpivotRequest::AggregateUnpivotRequest ( const std::string &  tableName_,
const std::vector< std::string > &  columnNames_,
const std::string &  variableColumnName_,
const std::string &  valueColumnName_,
const std::vector< std::string > &  pivotedColumns_,
const std::map< std::string, std::string > &  options_ 
)
inline

Constructs an AggregateUnpivotRequest object with the specified parameters.

Parameters
[in]tableName_Name of the table on which the operation will be performed. Must be an existing table/view, in [schema_name.]table_name format, using standard name resolution rules.
[in]columnNames_List of column names or expressions. A wildcard '*' can be used to include all the non-pivoted columns from the source table.
[in]variableColumnName_Specifies the variable/parameter column name. The default value is ''.
[in]valueColumnName_Specifies the value column name. The default value is ''.
[in]pivotedColumns_List of one or more values typically the column names of the input table. All the columns in the source table must have the same data type.
[in]options_Optional parameters. The default value is an empty map.

Definition at line 255 of file aggregate_unpivot.h.

◆ AggregateUnpivotRequest() [3/3]

gpudb::AggregateUnpivotRequest::AggregateUnpivotRequest ( const std::string &  tableName_,
const std::vector< std::string > &  columnNames_,
const std::string &  variableColumnName_,
const std::string &  valueColumnName_,
const std::vector< std::string > &  pivotedColumns_,
const std::string &  encoding_,
const std::map< std::string, std::string > &  options_ 
)
inline

Constructs an AggregateUnpivotRequest object with the specified parameters.

Parameters
[in]tableName_Name of the table on which the operation will be performed. Must be an existing table/view, in [schema_name.]table_name format, using standard name resolution rules.
[in]columnNames_List of column names or expressions. A wildcard '*' can be used to include all the non-pivoted columns from the source table.
[in]variableColumnName_Specifies the variable/parameter column name. The default value is ''.
[in]valueColumnName_Specifies the value column name. The default value is ''.
[in]pivotedColumns_List of one or more values typically the column names of the input table. All the columns in the source table must have the same data type.
[in]encoding_Specifies the encoding for returned records. Supported values: The default value is aggregate_unpivot_binary.
[in]options_Optional parameters. The default value is an empty map.

Definition at line 483 of file aggregate_unpivot.h.

Member Data Documentation

◆ columnNames

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

List of column names or expressions.

A wildcard '*' can be used to include all the non-pivoted columns from the source table.

Definition at line 506 of file aggregate_unpivot.h.

◆ encoding

std::string gpudb::AggregateUnpivotRequest::encoding

Specifies the encoding for returned records.

Supported values:

The default value is aggregate_unpivot_binary.

Definition at line 539 of file aggregate_unpivot.h.

◆ options

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

Optional parameters.

The default value is an empty map.

Definition at line 664 of file aggregate_unpivot.h.

◆ pivotedColumns

std::vector<std::string> gpudb::AggregateUnpivotRequest::pivotedColumns

List of one or more values typically the column names of the input table.

All the columns in the source table must have the same data type.

Definition at line 524 of file aggregate_unpivot.h.

◆ tableName

std::string gpudb::AggregateUnpivotRequest::tableName

Name of the table on which the operation will be performed.

Must be an existing table/view, in [ schema_name. ]table_name format, using standard name resolution rules.

Definition at line 500 of file aggregate_unpivot.h.

◆ valueColumnName

std::string gpudb::AggregateUnpivotRequest::valueColumnName

Specifies the value column name.

The default value is ''.

Definition at line 517 of file aggregate_unpivot.h.

◆ variableColumnName

std::string gpudb::AggregateUnpivotRequest::variableColumnName

Specifies the variable/parameter column name.

The default value is ''.

Definition at line 512 of file aggregate_unpivot.h.


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