Ir para o conteúdo

Lição 3 · Getting Started

Your First KNIME Workflow: Nodes, Ports, and Status

Build a first KNIME workflow, understand node status colors, ports, data types, and execution, and use the node monitor to check the table after each step.

In this lesson you build a tiny workflow from start to finish. Along the way you learn the three things you will use every day: how to configure a node, how to execute it, and how to check what came out.

The plan

You will create a small table by hand, filter it, and sort it. No files are needed.

TEXT
Table Creator -> Row Filter -> Sorter

The Table Creator node lets you type data into a grid inside KNIME. Enter this:

product category price stock
Pen Office 1.50 200
Desk Furniture 120.00 4
Lamp Furniture 35.00 0
Stapler Office 6.00 50

Add, connect, configure, execute

  1. Create a new workflow in your local space.
  2. Drag Table Creator from the node repository onto the canvas and type the table.
  3. Add Row Filter. Drag from the output port of the first node to the input port of the second.
  4. Configure the filter to keep rows where stock is greater than 0.
  5. Add Sorter after it and sort by price, highest first.
  6. Execute the last node. KNIME runs any earlier nodes that it needs first.

Common shortcuts are F6 to configure, F7 to execute, F8 to reset, F9 to cancel, and F10 to open a node's view. Adding Shift applies execute, reset, or cancel to all nodes.

Node status

Each node shows its state with a traffic light.

Node status

Not configured Settings are missing
Configured Ready to run
Executed Output is available
Failed Read the error
1 / 2

When you reset a node, the nodes after it are reset too, and their stored output is cleared. This keeps results consistent: no later node can keep an old table built from settings you changed. A change in a node's configuration has the same effect, which is why changing an early node means you re-execute the chain.

Ports

Connections run between ports. Data ports carry tables and appear as black triangles. Other kinds of ports carry other things, for example a trained model, a database connection, or flow variables, and they look different. You can connect an output only to an input of the same kind. Some inputs are optional, and KNIME shows those differently from required ones.

Look at the data

Select a node and open the node monitor. You see a preview of each output port, plus a statistics view with column names, types, and basic summaries. Make it a habit to check, after each important node:

  • How many rows are there, and is that plausible?
  • Did the column types stay as you expected?
  • Do a few sample values look right?

Here is a stand-in for your workflow that prints a row count after each step, which is the same habit in code.

Python Stand-in: Row Filter and Sorter with row counts

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

You should see four rows, then three, then three. If KNIME gave you a different count, check the filter condition.

Column data types

Every column has a type, and many nodes only accept certain types. The common ones are:

Type Holds Example
String Text Pen
Number (integer) Whole numbers 200
Number (decimal) Fractions 1.50
Boolean True or false true
Date and time Dates, times 2026-11-30

KNIME may label the number types with names such as Integer, Long, or Double. A price stored as a string will sort as text, so "120" comes before "6". Check types early.

Python Stand-in: text sorting versus number sorting

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Document as you go

Add a short label under each node that says why it exists, such as "keep items in stock". You can also add workflow annotations, colored text boxes on the canvas, by right-clicking the canvas and choosing the option for a new annotation. A workflow you can read in a month is worth far more than one that only works today.

Two common mistakes: executing the workflow but never opening any output, and saving a workflow that still holds data you should not share. Saving an executed workflow also saves its data, so reset the nodes before you send it to someone else.

Execute only what you need

You rarely need to run everything. If you select a node in the middle of a chain and execute it, KNIME runs the steps before it as required and stops there. This lets you build and check one stage at a time. A useful rhythm is:

  1. Add one node.
  2. Configure it.
  3. Execute it.
  4. Look at the output.
  5. Only then add the next node.

Beginners often add eight nodes first and run them together. When the result is wrong, they have eight places to search.

Read error messages

When a node fails or refuses to configure, KNIME shows a message on the node or in a log panel. Read all of it. The common causes are easy to recognize:

Symptom Likely cause What to check
Node stays red Required input or setting missing Open the dialog and the ports
A column cannot be selected Wrong data type Column types in the previous output
Previously fine node complains A column was renamed or removed upstream Reconfigure the node
Empty output A condition matched nothing The filter logic and sample values

A warning is different from an error. The node may finish while warning you about something such as skipped values. Treat warnings as questions that need an answer.

Practice task

Extend your workflow. Add a second row filter that keeps only the Office category, and add a column that shows the total value of the stock for each product, calculated as price times stock. You will learn the calculation in detail later, so for now try the node that lets you write an expression. Predict the result on paper first: the pen row should be 300.00 and the stapler row 300.00 as well. Then run it and compare. Making a prediction first is a powerful habit, because it forces you to notice when a result surprises you.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What does a yellow status light mean?

    Red is not configured, yellow is configured, and green is executed.
  2. 2. What happens to later nodes when you reset an earlier node?

    Resetting a node also resets the nodes that depend on it.
  3. 3. Why might the value 120 sort before 6?

    Text sorting compares characters one by one, so the type matters.
  4. 4. What should you do before sharing a workflow that processed sensitive data?

    An executed workflow saves its data too, so reset before sharing.

Summary

  • Add a node, connect ports, configure, execute, then inspect the output.
  • Traffic lights show not configured, configured, and executed; errors are marked.
  • Reset propagates to downstream nodes.
  • Ports only connect to ports of the same kind.
  • Check row counts and column types, label nodes, and reset before sharing.

Next: Reading CSV and Excel Files

Seu progresso fica salvo neste navegador. Não precisa de conta.