Table validator ... for rows

Hi,

I get an export from a 3rd party system that I cannot change, so I need to validate it in KNIME.

Image 2

I need to make sure that each site has a row for each day of the week. As in the screenshot, SiteA is correct but Site B and Site C are missing rows.

I am sure that there is a simple logical way to resolve this but I am not finding it. I would appreciate any suggestions.

Thanks.

tC/.

Hello @TigerCole,

unique count per Group in GroupBy node? Or Pivoting if you add DoW as pivot. Pivoting will give you which Site is missing which day. Then you can even do Unpivoting to get missing rows. See this example:

Br,
Ivan

3 Likes

hi @TigerCole
this is my example data table
immagine

Using this workflow
immagine

I get this result

KNIME_project8.knwf (13.5 KB)

1 Like

Lots of ways to get creative :grinning:

Here’s my take on this:

Validate Days of the Week.knwf (35.5 KB)

Results:

1 Like

Hi @badger101

I liked your suggestion, but I need to retain the day order. In your solution Site C has Friday and Sunday in the same row which would through the maths out downstream in the flow.

tC/.

2 Likes

Hi @TigerCole I personally like the workflow suggested by @ipazin , better than my own. You should have a look at it and the output that it gives. (I haven’t opened @duristef 's suggestion cause some of my nodes are similar to them) but the one by @ipazin is super simple.

2 Likes

Do a groupby and count the weekday column. If it is less then 7 you got the missing ones

1 Like

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