Dummy Node

Hi!

Is there something as a Dummy Node which just connects nodes?

Example: I have empty Table Switch Node and if table is not empty I write to database and after Database Writer I use Date&Time Input node for Timestamp. In case table is empty I have no need to write to database but I would still like to use Date&Time Input node for Timestamp in my log table. See picture attached.

Br,
Ivan

3 Likes

I usually use a Column Rename Node for these cases. Just leave the settings blank.
It is not sensitive to empty tables, so it won’t throw any errors.

3 Likes

Tnx! I will take it.
But Dummy Node could be useful as well :slight_smile:
Ivan

4 Likes

Hi all,
I keep running into this similar situation where dummy node will come in handy.

Within the loop, let’s say I am reading CSV and updating that CSV with additional processing and when the content of that CSV meets the condition, it finishes the loop. I have similar workflows with GoogleSheets and other type of data folding technologies/resources. With nodes like CSV reader or GoogleSheet reader, it needs to reset to read the updated info in the next loop execution and I have been trying to connect a variable port from some another nodes inside the loop, but sometimes I have to add a node just to make extra variable port available. Below isn’t real workflow but I tried to create one to demonstrate the challenge. This Empty Table Switch is only here to reset and trigger the CSV Reader Node 3537, because I’m already using the variable port from Generic Loop Start node to do the same with another CSV Reader Node 3534. I tried Column Rename node and it errors out since it needs to be configured. Is there any best practices for something like this? Please let me know if my explanation isn’t clear or confusing. Thank you so much for your help and time in advance.

2 Likes

I agree dummy node would be helpful in many cases but here you can simply connect the loop start to both csv readers.

2 Likes

Hi @alabamian2 , I’ve occasionally experienced similar situations The generalised problem for me, if I recall, is if we have a Switch where we wish data to progress (so not just flow variables) on one port, but we only want the flow variables to progress on the other port. The fact that the activation of the flow variable port cannot be controlled via the Switch condition means we lack control over a downstream process.

As an example I have a feeding data source. If that data source has rows, I wish to continue processing that data. If that data source has no rows, I wish to substitute in a different data source and process that instead.

Conceptually, I want this (except that I only want the flow variable port on the Empty Table Switch to be active if the input table is empty. )

My input feeding table looks like this:
image

My “substitute” data source looks like this:
image

and as things stand, my output data source is NOT what I would want, as it will always be the concatenation of both tables:
image

What I actually want is for it to be this:

image

So what I have done in the past, is use an Add Empty Rows node, and tell it to add zero rows, or require that there be at least zero rows! (which both equate to “do nothing”)/ In this specific example is probably doesn’t matter much what this node does as I won’t be using its output. I just want it to be minimum overhead. It could be used in other cases though where you want it to be present but not affect the data flow.

image

This is then activated only if the input table is empty, and as a consequence the substitute data is only used under that scenario.

Now my output data source will be


or
image

if I hook up my demo with an empty feeding table

So yes, I totally agree that the need for a dummy node is real. I haven’t needed it often, but I’ve certainly found need for it in very specific use-cases (of which this is obviously a contrived and simplified example)
Use case for do-nothing-node.knwf (24.5 KB)

8 Likes

Hi @kienerj
Wow, I didn’t know you could connect variable port to more than one. In the past, somehow (don’t remember which nodes) when I did that, it got rid of the other connection and that was happening rather frequently in one workflow and I got into the habit of believing you can only connect one outbound variable port to one incoming. Or maybe I got confused with incoming only allowing one connecting variable port connection. Either way, thank you for clarifying this for me. I think I can simplify some. Thank you!!! :slight_smile:

1 Like

Hello @takbb
Thank you for detailing the use case. Indeed I have the same situation in my workflow as well and with some head scratching hours, I used the Add Empty Rows node to control CSV/Excel/Gsheet/etc reader nodes. I’m glad that you saw that as an issue and had the same workaround. Thank you very much for sharing your use case. Thanks!!!

3 Likes

Great work @takbb
thanks a lot for your detailed explanation. Highly appreciated.

2 Likes

@ipazin - any news on this? Shouldn’t be so difficult to implement and test :wink:
One more reason: Keep large workflows clean. A dummy can be used as “outpost” for e.g. a data lane cumming from the left and that must be distributed to several nodes on the right. Ususally you have now multiple very long lanes through the whole workflow. With a dummy, you just have one and make short distribution lanes at the right.
A second one: If you change a lot, you always have to reconnect nodes. With a dummy node as distributor, you can unlink everything in front of this node and just have to re-connect it once.

Best!

1 Like

One alternative you can use is to create an empty Metanode or empty Component. You can have a Metanode or Component that’s just linking input port directly to output port without anything in between. This is the best simulation of a dummy node.

On my side, I created one as a shared Component so I can re-use it easily in any workflow. I’ll share it with everyone so you can use it too:

You can just drag it from the page to your workflow.

It can be used like this:
image

You can easily remove that Column Filter (Node 7) without having to reconnect all the nodes after the Dummy node.

5 Likes

Hello @Jrole,

no news on this one. Regarding development effort can’t comment much as I’m far from development :smiley:

Anyways I’ll put it on the list so let’s see :wink:

Br,
Ivan

2 Likes

Hi all,

hopefully I don’t spoil Christmas presents here, but some of these pain-points might be addressed with the new CASE Switch nodes in the nightly build:
image
(see AP-15521 in the changelog of the nightly build)

Regarding a “distributer dummy node” I’d opt for @bruno29a 's solution of creating a dummy component (such a nice icon :grinning_face_with_smiling_eyes:) - no need to further fill the node repository, I would say. Plus you can adjust the port types to your needs. What do you think?

Best regards,
Lukas

4 Likes

Thanks @LukasS . I used a crash dummy for the icon, since it’s a “dummy” node :sweat_smile:

And yes, one of the other reasons I mentioned empty Metanode or Component is that you can configure as many ports as needed - except if you are using a shared component.

2 Likes

So many good ideas, I’m using a Cache Node to handle the output ports of Empty Table Switches etc.
I also use that one to start metanodes and components, but never for it’s intended purpose :sweat_smile:

3 Likes

I usually make exactly the same as @takbb. Good approach!

2 Likes