Is there any handy tool that could replace cross join in the case below?
After building a workflow to calculate some measures, I would like to run this for all the element in a list (a seperate excel file). I think this works like looping right? I don’t wanna have too many rows to be appended to the dataset. In this example the List just consists of 3 Elements so that I use cross join but in case it is up to 100 that doesn’t seem very nice. In the Rule Engine Tool, It is desired to create a new column filling with the element in the file (Ausprägung). Looking forward to a dynamic solution.
could you rephrase what you need to do? I understand you need to calculate some combinations with two Cross Joiner nodes and then you give a label according to some condition inside the Rule Engine, but I think I’m missing what the workflow is doing and why. Without a good understanding, I am afraid I can’t give you a precise advice.
However, if you need to calculate all combinations with the csv and Excel files in input, the cross joiner might be your best alternative.
This is the excel file I’d have as input. The desired output would be a table having different combination of all the calculations like above for all elements in the excel input files (currently 3 items but later could be more). I’ve used cross joiner tool but the ouput table after cross joiner would be too big if there were 100 elements in the excel file. I’m looking for a dynamic solution that instead i just need to build a sample workflow for 1 element and run it iteratively for the other elements. Of course the end result table contains all the rows unioned (similarly achieved by using cross joiner…). So basically, it’s similar to batch macro concept in Alteryx, if it rings a bell.
Then you could just add a group loop node that iterates on Auspraegung, then use only one of your cross joiners for your combination creation. Than write your Excel and end loop with a variable end loop node (this creates one Excel file for each iteration; if not required, we will create just one).
Another thing we could do is applying a nominal row filter, so that in case you could exclude some names, they would not be included in the loop.
I think it can work. Do you want me to build a small example?
Hi @Tram_Nguyen , on my side, I still don’t understand what you are trying to do
Nevertheless, I just wanted to comment on your Rule Engine:
1- Is there any reason why you are using “LIKE” instead of “=” for the comparison? Are you using any wildcard in your comparison? There is a misunderstanding among some people where they think that “=” can only be used with numeric values, and not with string. Just wanted to clarify that it can be used to compare string values.
2- The 2 statements that you have are basically mutually exclusive, which means that you can write the statements as follows instead:
The TRUE statement represent the default value if none of the rules above it is satisfied. This will run much faster than what you have, as your NOT statement will have to be evaluated.
@lelloba you can probably simply link your String To Path (Variable) to your Column Expressions node instead of linking the Loop Start to the Column Expressions and String To Path (Variable) to Excel Writer.
Hey @lelloba , I’m not sure what is the purpose of using Variable Expression and String to Path… It’s a bit hard to imagine what’s going on without any input data.
Yes, I’m using wildcard * in the String Manipulation tool. That’s why I used LIKE.
I’m not sure if there is any better way of writing an If statement for “elseif”, or “else”… That why I come up with this:
Thanks for the shortcut. From now on I shall use TRUE statement when the statement is not met.