Icon

02 Transform using Pivot node

<p><strong>Transform using Pivot node</strong></p><p>Create a <strong>Pivot table</strong> with one or more group columns and one or more pivot columns. Apply basic aggregation methods like sum and count, statistical aggregation methods, and aggregation methods available for columns of type Date&amp;Time. Apply multiple aggregation methods to one or more aggregation columns.</p>

URL: The Pivoting Node: Basic Examples https://www.youtube.com/watch?v=zo9YdH9kgKQ&t=2s
URL: The Pivoting Node: Advanced Examples I https://www.youtube.com/watch?v=WXt7iiu9c98
URL: The Pivoting Node: Advanced Examples II https://www.youtube.com/watch?v=1Dilumi6X2I&t=1s
URL: KNIME Cheat Sheet : Building a KNIME Workflow for Beginners https://www.knime.com/sites/default/files/2021-07/CheatSheet_Beginner_A3.pdf
URL: KNIME Self Paced Course https://www.knime.com/knime-self-paced-courses

Basic example:
Pivot table with one group and one pivot column

Question: How many male/female customers belong to each age bin?

  • Group: Age Bin

  • Pivot: Gender

  • Aggregation Column: CustomerKey (or any other)

  • Aggregation Operator: Count

Two group columns

Question: Which web activity classes are represented in groups according to marital status, gender and sentiment?

  • Group: MaritalStatus, Gender

  • Pivot: Sentiment Analysis

  • Aggregation Column: WebActivity

  • Aggregation Operator: Unique concatenate

Aggregation Column of Type Date and Time

Question: What is the age dispersion of the customers according to different product and sentiment groups?

  • Group: Product

  • Pivot: Sentiment analysis

  • Aggregation Column: birthday

  • Aggregation Operator: Date range(day)

Two aggregation operators

Question: What is the mean and standard deviation of income according to different sentiment and gender groups?

  • Group: Sentiment Analysis

  • Pivot: Gender

  • Aggregation Column: EstimatedYearlyIncome

  • Aggregation Operator: Mean, Standard deviation

Transform using Pivot node


Create a Pivot table with one or more group columns and one or more pivot columns. Apply basic aggregation methods like sum and count, statistical aggregation methods, and aggregation methods available for columns of type Date&Time. Apply multiple aggregation methods to one or more aggregation columns.

Two pivot columns

Question: What is the most common product among customers according to their sentiment, gender and marital status?

  • Group: Sentiment Analysis

  • Pivot: MaritalStatus, Gender

  • Aggregation Column: Product

  • Aggregation Operator: Mode

Workflow complete!

Keep the momentum going by exploring Just KNIME It!on the Hub to challenge yourself and see how these nodes can be integrated into more complex workflows and use cases.

Count of customers
Pivot
Mean and standard deviation of income
Pivot
Read democustomer data
Table Reader
Date range(day) of birthdays
Pivot
Read democustomer data
Table Reader
Unique concatenate of web activity classes
Pivot
Customer data
Table Reader
Mode of product
Pivot
Read democustomer data
Table Reader
Read democustomer data
Table Reader

Nodes

Extensions

Links