This scenario is similar to the situation that was discussed in this post. It's not the same but the logic can be adapted to select dataset A if it contains records or dataset B if there were zero records in dataset A.
A dummy record is concatenated with the data from dataset A (your Node 2) so that there is always at least one record in the dataset, with the dummy record always being the first (or only) record in the dataset.
A record count field and a dataset ID field are added to dataset A. The record count is zero indexed (meaning the dummy record will have a record count of 0). The dummy data field is removed from dataset A.
The data in the alternative dataset (your Node 1) is modified to also have the record count field and the dataset ID. In this case the record count is fixed at -1 and the dataset ID is set to "B". Note that the metadata for the two data sets is now identical.
The two data sets are then concatenated, with the records from dataset A being the first records output from the Cat node.
A transform node is then used to determine which data set to output. The first record is discarded as this will always be the dummy record. Then for subsequent records, the node examines the value of the record count field. If the record count is greater than zero then there was at least one 'real' record in dataset A so the node is configured to output the records from that dataset.If there were no 'real' records in dataset A then the node remains configured to output records from dataset B.
Note: Data360 Analyze 3.6.0 or above is needed to import the example data flow.
Attached files
Output_Alternative_Dataset_If_Zero_Records - 7 Apr 2020.lna