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. | |
| 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. | |
| 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. | |
Public Attributes | |
| std::string | tableName |
| Name of the table on which the operation will be performed. | |
| std::vector< std::string > | columnNames |
| List of column names or expressions. | |
| std::string | variableColumnName |
| Specifies the variable/parameter column name. | |
| std::string | valueColumnName |
| Specifies the value column name. | |
| std::vector< std::string > | pivotedColumns |
| List of one or more values typically the column names of the input table. | |
| std::string | encoding |
| Specifies the encoding for returned records. | |
| std::map< std::string, std::string > | options |
| Optional parameters. | |
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]
| inline |
Constructs an AggregateUnpivotRequest object with default parameters.
Definition at line 42 of file aggregate_unpivot.h.
◆ AggregateUnpivotRequest() [2/3]
| inline |
Constructs an AggregateUnpivotRequest object with the specified 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.
|
Definition at line 262 of file aggregate_unpivot.h.
◆ AggregateUnpivotRequest() [3/3]
| inline |
Constructs an AggregateUnpivotRequest object with the specified 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:
|
| [in] | options_ | Optional parameters.
|
Definition at line 497 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 520 of file aggregate_unpivot.h.
◆ encoding
| std::string gpudb::AggregateUnpivotRequest::encoding |
Specifies the encoding for returned records.
Supported values:
- aggregate_unpivot_binary: Indicates that the returned records should be binary encoded.
- aggregate_unpivot_json: Indicates that the returned records should be JSON-encoded.
The default value is aggregate_unpivot_binary.
Definition at line 553 of file aggregate_unpivot.h.
◆ options
| std::map<std::string, std::string> gpudb::AggregateUnpivotRequest::options |
Optional parameters.
- aggregate_unpivot_create_temp_table: If true, a unique temporary table name will be generated in the sys_temp schema and used in place of result_table. If result_table_persist is false (or unspecified), then this is always allowed even if the caller does not have permission to create tables. The generated name is returned in qualified_result_table_name. Supported values:The default value is aggregate_unpivot_false.
- aggregate_unpivot_collection_name: [DEPRECATED–please specify the containing schema as part of result_table and use GPUdb::createSchema to create the schema if non-existent] Name of a schema which is to contain the table specified in result_table. If the schema is non-existent, it will be automatically created.
- aggregate_unpivot_result_table: The name of a table used to store the results, in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria. If present, no results are returned in the response.
- aggregate_unpivot_result_table_persist: If true, then the result table specified in result_table will be persisted and will not expire unless a ttl is specified. If false, then the result table will be an in-memory table and will expire unless a ttl is specified otherwise. Supported values:The default value is aggregate_unpivot_false.
- aggregate_unpivot_expression: Filter expression to apply to the table prior to unpivot processing.
- aggregate_unpivot_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 input table. If any alias is given for any column name, the alias must be used, rather than the original column name. The default value is ”.
- aggregate_unpivot_chunk_size: Indicates the number of records per chunk to be used for the result table. Must be used in combination with the result_table option.
- aggregate_unpivot_chunk_column_max_memory: Indicates the target maximum data size for each column in a chunk to be used for the result table. Must be used in combination with the result_table option.
- aggregate_unpivot_chunk_max_memory: Indicates the target maximum data size for all columns in a chunk to be used for the result table. Must be used in combination with the result_table option.
- aggregate_unpivot_compression_codec: The default compression codec for the result table’s columns.
- aggregate_unpivot_limit: The number of records to keep. The default value is ”.
- aggregate_unpivot_ttl: Sets the TTL of the table specified in result_table.
- aggregate_unpivot_view_id: View this result table is part of. The default value is ”.
- aggregate_unpivot_create_indexes: Comma-separated list of columns on which to create indexes on the table specified in result_table. The columns specified must be present in output column names. If any alias is given for any column name, the alias must be used, rather than the original column name.
- aggregate_unpivot_result_table_force_replicated: Force the result table to be replicated (ignores any sharding). Must be used in combination with the result_table option. Supported values:The default value is aggregate_unpivot_false.
The default value is an empty map.
Definition at line 683 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 538 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 514 of file aggregate_unpivot.h.
◆ valueColumnName
| std::string gpudb::AggregateUnpivotRequest::valueColumnName |
Specifies the value column name.
The default value is ”.
Definition at line 531 of file aggregate_unpivot.h.
◆ variableColumnName
| std::string gpudb::AggregateUnpivotRequest::variableColumnName |
Specifies the variable/parameter column name.
The default value is ”.
Definition at line 526 of file aggregate_unpivot.h.
The documentation for this struct was generated from the following file:
- gpudb/protocol/aggregate_unpivot.h