Icon

05 Transform using Pivot node

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

URL: KNIME Learning Center https://www.knime.com/learning
URL: KNIME Cheat Sheet: Building a KNIME workflow for beginners https://www.knime.com/cheat-sheets/building-knime-workflow-beginners
URL: KNIME Cheat Sheet: Data wrangling with KNIME Analytics Platform https://www.knime.com/files/data-wrangling-with-knime.pdf
URL: YouTube: Data Aggregation with KNIME: Pivoting https://youtu.be/CztrVMdjuug?si=5LZcqhew6hV-yeDV

Annotations and comments
  • Basic Pivot table example: One group column 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
  • One group column and 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
  • Two group columns and one pivot column 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 of Date&Time column 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
  • 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
  • Mode of product
  • Unique concatenate of web activity classes
  • Date range(day) of birthdays
  • Mean and standard deviation of income
  • Read demo customer data
  • Customer data

Nodes

Extensions

Links