Problem Statement: Need to inject a dynamic list into a SQL IN clause that may exceed the 1000 limit.
Solution:
- I first isolated my column containing the row of values I needed to inject into the SQL IN clause with the column filter node.
- I then appended a new column that would contain a constant value to be used in the group by node.
- I then used the group by node to group the data by the single value and then set the aggregate method to concatenate with a comma as the delimiter.
- After the column is concatenated, I used the String Replacer node to apply a RegEx Replace function to apply the single quotes between each part number. The pattern is ([^.]+) and the Replacement is ā$1ā
Make sure to toggle the āAll occurrencesā replacement strategy.
- I then used the row_to_variable node to create a flow variable from the concatenated and RegEx output.
- I then I connected the flow variable into the DB Query Reader node and put the flow variable in my SQL IN clause between the parenthesis.
- The final step is to add the loop end node to allow the flow to continue past the 1000 item limit.
Here is the workflow visual.
Cheers,
Tyler