KNIME logo
Contact SalesDownload
Back to all templates

How to Operate with Numbers, Strings and Rules

Working with data often requires transforming numbers, text, and categories to extract meaning or prepare for analysis. This involves applying rules, calculations, and string manipulations to create new insights or clean up information.

Data TransformationData basics how-to
Header icon
Workflow
70%
How to Operate with Numbers, Strings and Rules

How This Workflow Works

This workflow demonstrates how to transform data by defining rules, performing computations or manipulating strings. It defines an if-else statement that categorizes people based on their weekly work hours, rounds ages to the nearest ten, and cleans up country names by replacing hyphens with spaces.

Key Features:

  • Define ad-hoc rules to categorize individuals based on work hour
  • Standardize data by rounding numeric columns to consistent intervals
  • Clean and format text fields for better readability

Step-by-step:

1. Apply Custom Rules:

The workflow defines a custom rule via an if-else statement to assign each person to a category based on the number of hours they work per week. This helps segment the data into meaningful groups for further analysis.

2. Standardize Age Values:

It rounds each person's age up to the nearest ten, making age data easier to group and compare across the dataset.

3. Clean and Format Text Fields:

The workflow replaces hyphens with spaces in the country names, ensuring consistency and improving the clarity of the text fields.

How to Get Started