Accepts a mandatory input and an optional input and then inspects both inputs. The main use of this node is to create loops within a data flow.
When the Switch node runs, it inspects both inputs; if the second (optional) input contains data, this data is output. Otherwise, the data from the first input is output. The first input must always have data, while it is not mandatory for the second (optional) input to contain data.
"Data" can be considered to include metadata without any data rows for the purposes of the switching logic. Therefore, for an input pin to contain "no data", the input must be null and not just 0 records.
Clocks should be used if the node needs to wait for data from the second input pin, see Creating run dependencies.
Inputs and outputs
Inputs: in1, in2.
Outputs: Switched Data.