November 19, 2025

How to use the Data Cleansing Component in KNIME

By Sampath N D

Cleaning up your data is crucial before any analysis or reporting. It helps remove errors, standardize formats, and make your dataset more reliable. With KNIME, you can build a custom Data Cleansing component that works just like the built-in Data Cleansing tool in Alteryx.

In this blog, we’ll guide you through creating a reusable Data Cleansing component in KNIME using sample data. You’ll learn how to configure it to handle missing values, remove unwanted characters, standardize text, and more, all without writing a single line of code.

By the end, you’ll have a KNIME component that simplifies your data preparation process and ensures your data is clean, consistent, and analysis-ready.

What is the Data Cleansing Component 

Data cleaning is preparing raw data for analysis by correcting errors, filling in missing values, standardizing formats, and removing inconsistencies. It ensures the data is accurate, complete, and reliable, making it suitable for downstream tasks like reporting, analytics, and machine learning. Clean data helps avoid misleading insights and supports better decision-making across business processes.

The Benefits of the Chart

Saves You Time

Instead of repeating the same cleaning steps in every workflow, you can build it once and reuse it anywhere.

Keeps Things Consistent

Everyone on your team cleans data similarly, meaning fewer mistakes and more reliable results.

Easy to Customize​

You can tweak how the component works, like removing spaces or fixing missing values, without touching the logic inside.

Makes Workflows Cleaner

Wrapping all the messy cleaning steps into one neat component keeps your KNIME workflows tidy and easy to follow

Encourages Good Habits

It helps you and your team stick to a structured approach to data prep, making projects easier to manage and maintain.

Why do we need this Component?

Saves Time and Simplifies Workflow

Instead of using multiple KNIME nodes for cleaning tasks like removing nulls or formatting text, this single component combines them, speeding up the data prep process.

Bridges the Alteryx-to-KNIME Transition

As companies shift from Alteryx to KNIME to reduce licensing costs, this component helps ease that transition by replicating Alteryx’s Data Cleansing tool with a nearly identical interface.

User-Friendly and Familiar

The component is designed to feel like Alteryx, making it easy for users, especially those familiar with Alteryx, to adopt KNIME without a steep learning curve.

How to use the Data Cleansing Component in KNIME

Step 1: Import the Component into KNIME

  1. Download the Component

    This component is published in Knime Community Hub. To navigate to that location,

    1. Click on this LINK, and it will navigate to the Knime Community Hub, where this component is located.

    2. Select the Download Workflow option and click on Download Workflow. The Data Cleansing component gets downloaded to your Local Machine.

  1. Open KNIME and Go to Your Workflow Projects

    Launch KNIME and open the workspace where you want to use the component.

  2. Import the Component into Your Workspace

    1. Go to the top left corner and select Local Space, then click on the Import Workflow option. A window will open, allowing you to select the downloaded component.

    2. Select the downloaded KNIME Workflow “Data Cleansing Component”, then click on Open or double-click on it.

  1. Now, double-click on the component that you imported to open the workflow. You can see the Data Cleansing Component Workflow now. 

Note: This workflow includes a Data Cleaning Component along with sample data. You can simply copy the component and paste it into any of your own KNIME workflows where data cleaning is needed. It’s reusable, configurable, and ready to be used in your projects.

Step 2: Features of this Component and its configuration. What it is offering

Let’s understand how this component works and what its capabilities are.

Remove Null Data

The sample data included in this component is a Loan dataset containing:

  • 16 columns

  • 250 rows

  • Among these, 4 rows and 2 columns are completely null (i.e., every value in those rows/columns is null)

To automatically clean this up:

  1. Open the component by double-clicking it.

  2. In the Remove Null Data section:

    1. Check the box Remove Null Columns – this will delete columns where all rows are null.

    2. Check the box Remove Null Rows – this will delete rows where all columns are null.

  3. Execute the workflow to apply the changes.

Once executed, the cleaned data will no longer include those fully-null rows and columns.

  • Rows reduced from 250 ➝ 246

  • Columns reduced from 16 ➝ 14

Select the Field to Cleanse

Here, you can select the fields that you want to clean. All the below options, like Replace Nulls, Remove Unwanted characters, Specific Characters to Remove, and Modify cases, alter only the fields selected under Select fields to Cleanse.

Replace Nulls

You can handle missing values in this section by replacing nulls with appropriate defaults. First, select the relevant columns under the Select Fields to Cleanse section. Then, depending on the type of data you’re working with, choose either Replace with Blanks (String Fields) for text fields, Replace with 0 (Numeric Fields) for numeric fields, or select both if your selection includes a mix of text and numeric data.

For example, let’s select the columns Emp_Experience (numeric) and Home_Ownership (string). Since dealing with both data types, we check both options: Replace with Blanks and Replace with 0. After running the workflow, you’ll see that all null values in Emp_Experience are replaced with zeros, while nulls in Home_Ownership are replaced with blank strings. This simple setup helps ensure your data is free from missing values and is ready for downstream processing.

Remove Unwanted Characters

Real-world data often contains unwanted clutter, extra spaces, strange symbols, numbers mixed into text, etc. This component helps you clean all that up with just a few clicks. You’ll find six options here that let you remove leading and trailing spaces, duplicate spaces, all whitespace, letters, numbers, and punctuation.

  1. Leading and Trailing Whitespace

  2. Tabs, Line Breaks, and Duplicate Whitespace

  3. All Whitespace

  4. Letters

  5. Numbers

  6. Punctuation

Let’s say we’re working with three columns: Education, Home_Ownership, and Previous_Loan_Defaults. The Education field contains punctuation (like @) and extra spaces between words. The Home_Ownership field has unnecessary spaces at the beginning and end. Meanwhile, the Previous_Loan_Defaults column includes numbers that we don’t need.

To clean this up, we simply tick the checkboxes for:

  • Leading and Trailing Whitespace

  • Tabs, Line Breaks, and Duplicate Whitespace

  • Numbers

  • Punctuation

Once you run the workflow, you’ll see that the text is cleaned up. Spaces are trimmed, symbols are gone, and the fields look much more structured. It’s a quick and powerful way to make your data cleaner and more readable.

Note on "All Whitespace" and "Letters" Options

Some cleaning options are more aggressive than others—”All Whitespace” and “Letters” fall into that category. That’s why it’s important to be extra careful when using them. These options will remove all whitespace or all letters from every field you’ve selected under the Select Fields to Cleanse section.

So, if you accidentally select multiple fields when applying these, you might end up stripping important information from columns you didn’t intend to modify. To avoid that, make sure you select only the specific columns that actually need these transformations.

All Whitespace

Let’s explore how this works in action. For example, under the Select Fields to Cleanse section, select only the Education and Home_Ownership fields. Now, check the All Whitespace option under Remove Unwanted Characters and execute the workflow.

Once the component runs, it will clean up those two fields as instructed:

  • The Education column removes duplicate or unnecessary whitespaces between words.

  • The Home_Ownership column trims off any leading and trailing spaces.

Letters

Now let’s see how the Letters option works. Select only the Previous_Loan_Defaults field under the Select Fields to Cleanse section. Then, check the Letters option under Remove Unwanted Characters and execute the workflow.

Once the component runs, all the alphabetic characters from the Previous_Loan_Defaults column will be removed. This is helpful when you want to clean up fields that should only contain numbers or symbols, especially if they’ve been mixed with text.

Modify Cases

Changing the case of text fields is simple and flexible using this component. You can choose from the following four options when configuring the Modify Case setting:

  1. Upper case – Converts all letters in the selected fields to uppercase.

    Example: John DoeJOHN DOE

  2. Lower case – Converts all letters to lowercase.

    Example: John DOEjohn doe

  3. Title case – Capitalizes the first letter of each word after the following punctuations, including whitespace in the string.

    ! " # $ % & ' ( ) * + , \ - . / : ; < = > ? @ [ / ] ^ _ ` { | } ~

    Example: john DOEJohn Doe and john@DOEJohn@Doe

  4. No Change – Leaves the original casing untouched. This is useful if you want to clean other aspects of the data without modifying text formatting.

Let’s walk through how Title Case works using this component. Start by selecting the following fields: Gender, Education, Emp_Experience, Home_Ownership, Previous_Loan_Defaults, and Loan_Intent under the Select Fields to Cleanse section.

Next, enable all options under Replace Nulls and Remove Unwanted Characters, except for All Whitespaces and Letters, as those might affect the formatting you want to keep. Finally, choose Title Case under the Modify Case section, and run the workflow.

Once executed, you’ll see that all selected fields have been transformed into neat, readable Title Case, a quick and easy way to standardize your text data.

Step 3: Go Beyond Alteryx – Remove Any Special Characters

Special Characters to Remove

So far, all the features we explored closely mirror Alteryx’s Data Cleansing tool, but here’s where this KNIME component takes it a step further. One standout feature is the ability to remove any special characters from your dataset, not just the standard punctuation marks. All you need to do is type or paste those special characters into the Special Characters to Remove field.

The Gender column has some special symbols (like gender icons) not part of the usual punctuation. Copy and paste those symbols into the Special Characters to Remove box, run the workflow, and the component will clean them up for you.

Best Practices for Using the Data Cleansing Component

  1. Be Selective with Fields
    Always select only the columns that actually need cleaning under “Select Fields to Cleanse.” If you select all columns and use aggressive options like “Remove Letters” or “All Whitespaces,” you might unintentionally remove valuable information.

  2. Avoid Overlapping Cleaning Rules
    For example, if you’re using both “All Whitespace” and “Tabs, Line Breaks, Duplicate Whitespace,” be sure they’re really needed. Both affect spacing and could over-clean or alter important formatting.

  3. Use “Special Characters to Remove” Thoughtfully
    Only enter the characters you actually want to remove. This powerful feature should be used carefully to avoid unintended data changes.

  4. Use the “No Change” Option for Text Fields You Want to Keep As-Is
    If you’re cleaning nulls or special characters but don’t want to touch text casing, select “No Change” under Modify Case. It gives you control without altering the format.

  5. Validate After Execution
    Once you run the workflow, check your data using Table View. Ensure those nulls are gone, unwanted characters are removed, and casing changes look right.

Closing

The KNIME Data Cleansing Component is a simple yet powerful tool that makes data preparation much easier. From removing nulls to fixing inconsistent text and handling unusual special characters, it brings everything you need into one place. It’s flexible and user-friendly, giving you full control over your data’s appearance before you analyze. 

Whether you’re working with a small spreadsheet or a massive dataset, this component helps you start with clean, reliable data without the hassle.

phData Blue Shield

Need help tackling tricky data challenges?

To get even more out of your KNIME workflows, reach out to the team at phData. We’re always here to talk through your ideas, offer support, or work with you on your next project, so you can feel confident about the quality of your data every step of the way.

Data Coach is our premium analytics training program with one-on-one coaching from renowned experts.

Accelerate and automate your data projects with the phData Toolkit