PIVOT - Amazon Glue DataBrew
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

PIVOT

Converts all the row values in a selected column into individual columns with values.

Parameters
  • sourceColumn — The name of an existing column. The column can have a maximum of 10 distinct values.

  • valueColumn — The name of an existing column. The column can have a maximum of 10 distinct values.

  • aggregateFunction — The name of an aggregation function. If you don't want aggregation, use the keyword COLLECT_LIST.

Example

{ "Action": { "Operation": "PIVOT", "Parameters": { "aggregateFunction": "SUM", "sourceColumn": "state_name", "valueColumn": "all_votes" } } }