disable a flow on the basis of file availability

Hi All,

Is there any provision in knime to disable a flow in the workflow on the basis of file availability?
For eg: if file is not available in the given location, then can we disable the flow in front of it.
I need to make some nodes conditional. Empty table switch wont work here.

Kindly suggest.

Hi,
you can you this node by Vernalis, Flow Variable IF Switch, by installing the extension.

Then you have to check if a file is present or not in a directory, so list files does this.
With groupby i count the number of files, convert that number in a variable, adding some logic into rule engine (count = 0 => “top”, TRUE => “bottom”), and then plugging this variable to control the switch:
image

So, in case of 0 files, you’ll trigger the top flow, otherwise the bottom flow.

Hope it works for you.

Luca

2 Likes

Hi Thank u so much for the solution, But list file is working fine on desktop version but is not supporting on server by throwing error:Remote directories not supported.
Is there any other node for server

Do you mean KNIME server?
u can use this configuration instead:
image

3 Likes

Ok great…Thanks A lot… :grinning: :grinning:

1 Like

Hello @sahil786,

but if List Files node returns empty data (or any node that follows it) why Empty Table Switch node won’t work?

Br,
Ivan

1 Like

Hi @ipazin

I was not aware about list file node… that is why i was saying that only empty table switch wont work dere…but aftr list file node…it is working fine…

Thanks for looking into it…

3 Likes

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