2.1.0
User Documentation for Apache MADlib
pivot.sql_in File Reference

SQL functions for pivoting. More...

Functions

void pivot (text source_table, text output_table, text index, text pivot_cols, text pivot_values, text aggregate_func, text fill_value, boolean keep_null, boolean output_col_dictionary, text output_type)
 Helper function that can be used to pivot tables. More...
 
void pivot (text source_table, text output_table, text index, text pivot_cols, text pivot_values, text aggregate_func, text fill_value, boolean keep_null, boolean output_col_dictionary)
 
void pivot (text source_table, text output_table, text index, text pivot_cols, text pivot_values, text aggregate_func, text fill_value, boolean keep_null)
 
void pivot (text source_table, text output_table, text index, text pivot_cols, text pivot_values, text aggregate_func, text fill_value)
 
void pivot (text source_table, text output_table, text index, text pivot_cols, text pivot_values, text aggregate_func, boolean keep_null)
 
void pivot (text source_table, text output_table, text index, text pivot_cols, text pivot_values, text aggregate_func)
 
void pivot (text source_table, text output_table, text index, text pivot_cols, text pivot_values, boolean keep_null)
 
void pivot (text source_table, text output_table, text index, text pivot_cols, text pivot_values)
 
varchar pivot (varchar message)
 
varchar pivot ()
 

Detailed Description

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Date
June 2016
See also
Creates a pivot table for data summarization.

Function Documentation

◆ pivot() [1/10]

void pivot ( text  source_table,
text  output_table,
text  index,
text  pivot_cols,
text  pivot_values,
text  aggregate_func,
text  fill_value,
boolean  keep_null,
boolean  output_col_dictionary,
text  output_type 
)
Parameters
source_tableThe original data table
output_tableThe output table that contains the dummy variable columns
indexThe index columns to group by the records by
pivot_colsThe columns to pivot the table
pivot_valuesThe value columns to be summarized in the pivoted table
aggregate_funcThe aggregate function to be applied to the values
fill_valueIf specified, determines how to fill NULL values resulting from pivot operation
keep_nullThe flag for determining how to handle NULL values in pivot columns
output_col_dictionaryThe flag for enabling the creation of the output dictionary for shorter column names
Returns
Void

◆ pivot() [2/10]

void pivot ( text  source_table,
text  output_table,
text  index,
text  pivot_cols,
text  pivot_values,
text  aggregate_func,
text  fill_value,
boolean  keep_null,
boolean  output_col_dictionary 
)

◆ pivot() [3/10]

void pivot ( text  source_table,
text  output_table,
text  index,
text  pivot_cols,
text  pivot_values,
text  aggregate_func,
text  fill_value,
boolean  keep_null 
)

◆ pivot() [4/10]

void pivot ( text  source_table,
text  output_table,
text  index,
text  pivot_cols,
text  pivot_values,
text  aggregate_func,
text  fill_value 
)

◆ pivot() [5/10]

void pivot ( text  source_table,
text  output_table,
text  index,
text  pivot_cols,
text  pivot_values,
text  aggregate_func,
boolean  keep_null 
)

◆ pivot() [6/10]

void pivot ( text  source_table,
text  output_table,
text  index,
text  pivot_cols,
text  pivot_values,
text  aggregate_func 
)

◆ pivot() [7/10]

void pivot ( text  source_table,
text  output_table,
text  index,
text  pivot_cols,
text  pivot_values,
boolean  keep_null 
)

◆ pivot() [8/10]

void pivot ( text  source_table,
text  output_table,
text  index,
text  pivot_cols,
text  pivot_values 
)

◆ pivot() [9/10]

varchar pivot ( varchar  message)

◆ pivot() [10/10]

varchar pivot ( )