Flow Variables to Table Creator for Mapping

Hi, KNIME beginner here and I really need your help please! :sob:

I am wondering if we are able to push values through flow variables into a Table Creator node so that we can input mapping data from there.

Say I have a list of data set that has multiple and duplicated value for “Seasons”.
This list can contain typos and incorrect data that I would need to amend.
image

I used the Groupby node to find all Unique values of “Seasons” within this dataset.
image

I was wondering if there is a way in KNIME to auto populate Table Creator node with this set of unique values from the Groupby Node.

What I am ultimately trying to achieve is that I could push the unique values into Table Creator to which user can then manually input a mapping table according to the unique values that was found in the dataset.

Example:
image

My issue is that there are many errors within the dataset and I cannot be certain what kind of typo errors can occur and therefore the mapping will be different every clean.
So if there is a way for KNIME to auto populate the table creator node with the current unique values per this current dataset, it would help the user do a “replace all” appropriate to this dataset (that may be different month on month).

Please send some help!!!
Appreciate yall!
Thank you!

Hello @neekstressed,

and welcome to KNIME Community!

Controlling Table Creator node with flow variables is a bit cumbersome and I would suggest to stay away from it. Especially when there are other (better) options for your use case.

So if I got your process right you should first get unique values and for it you can use GroupBy node as you did but also Duplicate Row Filter node (which is more intuitive and has a bit more options if you’ll need it in future). Also after it you won’t need Column Filter node probably. Then you need to present users with option to input correct mapping for season column. Node you can use here is Table Editor. Missing functionality in it is that you are unable to create new columns (and rows as well I think) with it so you should create it before and it’s best to be empty. This you can easily do in Table Creator node but as your list probably doesn’t come from it see here how to easily add new column with missing values to your data table (missing values in KNIME are denoted as red question marks).

See here a screenshot of suggested idea:

Then you’ll probably want to correct starting dataset and for it you can use Cell Replacer node.

Give it a try and if any questions/issues feel free to ask. Hope this helps!

Br,
Ivan

2 Likes

Hi Ivan!

Thanks for sharing! This Table Editor node is really amazing!
But it doesn’t solve what I am trying to achieve, or maybe I am doing it wrong.

Currently, my workflow looks like this.

I have a main data source that has multiple rows and columns of data.
So part of my cleaning is trying to iron out the typos within the Season column.
My current workaround is that I extract out Unique values within the main data set using Groupby Node.
image

Then I have the users open the Group Table to copy out the unique values.
And then paste it back into Table Creator Node.
image

Then I have it mapped back into main data using Joiner Node
image

I was just thinking if there is a way to automate or auto-populate the Unique values into Table Creator so that Users can avoid the manual copy and pasting of values to have it replaced.

Do you have any suggestions for that?
Or would Table Editor be able to do that as well?

I tried Table Editor but it would mean that user can only change a few values (if we use Duplicate Filter Node to filter unique values) or they would have to go through rowsssss of data to clean it manually. Otherwise, Cell Replacer, would also mean that they would need to manually input the “old values” and then the new values similar to my current workflow. Am I doing this correctly?

Thank you once again!! Appreciate the time!! <3

Hello @neekstressed,

so Table Editor should be used to enter correct season. And with connecting it to table that has unique values and one empty column you’ll get automation you are looking for. Cell Replacer is here just for mapping (instead of Joiner).

Here is workflow example to check:
CorrectWrongValues.knwf (14.0 KB)

Br,
Ivan

1 Like

Hi @ipazin,

I understand it now! Thank you so much for the example!
It is perfect! Life saver!!

2 Likes

Glad to hear that @neekstressed.
Br,
Ivan

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.