pub async fn aggregate_unpivot( &self, table_name: String, column_names: Vec<String>, variable_column_name: String, value_column_name: String, pivoted_columns: Vec<String>, ) -> Result<AggregateUnpivotResponse, KineticaError>
Rotate column values into rows values.
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.
table_name- 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.column_names- List of column names or expressions. A wildcard ‘*’ can be used to include all the non-pivoted columns from the source table.variable_column_name- Specifies the variable/parameter column name.value_column_name- Specifies the value column name.pivoted_columns- 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.
pub async fn aggregate_unpivot_with_opts( &self, table_name: String, column_names: Vec<String>, variable_column_name: String, value_column_name: String, pivoted_columns: Vec<String>, options: AggregateUnpivotRequestOptions, ) -> Result<AggregateUnpivotResponse, KineticaError>
Rotate column values into rows values.
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.
table_name- 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.column_names- List of column names or expressions. A wildcard ‘*’ can be used to include all the non-pivoted columns from the source table.variable_column_name- Specifies the variable/parameter column name.value_column_name- Specifies the value column name.pivoted_columns- 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.options- The optional parameters; any left unset take the server’s defaults.
pub async fn aggregate_unpivot_request( &self, request: &AggregateUnpivotRequest, ) -> Result<AggregateUnpivotResponse, KineticaError>
Sends a pre-built AggregateUnpivotRequest to the /aggregate/unpivot endpoint and decodes the records it returns. Only binary encoding is supported.
pub async fn aggregate_unpivot_raw( &self, request: &AggregateUnpivotRequest, ) -> Result<RawAggregateUnpivotResponse, KineticaError>
Sends a pre-built AggregateUnpivotRequest to the /aggregate/unpivot endpoint, returning the response as the server sends it.
pub async fn aggregate_unpivot_from_url( &self, url: &str, request: &AggregateUnpivotRequest, ) -> Result<RawAggregateUnpivotResponse, KineticaError>
Sends a pre-built AggregateUnpivotRequest to a specific worker URL, bypassing HA head-node selection. Used for multi-head access.