Hi @tqAkshay95 ,
As java snippet itself can only handle a single table, it is reliant on the rows already having been joined in a suitable manner, so that it can perform the required comparisons. In your workflow, whilst the joiner may work under very specific data conditions, I believe it would not work under most circumstances because it can only handle exact joins which we don’t have here. I can’t test your workflow as I don’t have access to your input xlsx files, but I think your java snippet would work, if you used a Cross Joiner instead of a Joiner.
This is what I meant earlier about “using cross join to join everything in table 1 to table 2”. It is unfortunately a necessary step.
@kamtaot , thank you for supplying demo data. The attached workflow demonstrates the suggestions from my previous comment, using your uploaded data.
The first two branches demo the mentioned components. The third branch uses standard nodes.
Join Between Component
Join Custom Condition - indexed Component
Of those two “component” methods, the second requires basic knowledge of sql syntax but with that “power” it gives more options as the conditions can be made more complex. It is also more performant on larger data sets because the component creates indexes on the columns used in the condition. I may at some point get round to trying to add indexes within the other component too, but that’s not there yet!
From your data, it looks like sometimes a row in one table matches to more than one row in the other table, so you may need to include additional filters, for example if there are any other “column matching conditions”, you could add a Rule Engine at the end to include those.
In the “Join Custom Condition” component, you could simply include additional columns in the condition clause.
At the end, you can add column filters (or configure the components) to keep the columns that you want, such as IP Address.
join where one date on table 1 between two dates on table 2.knwf (201.5 KB)