Hi, Thanks for the guidances. Shall try it out. Thanks a ton.
Regards Ganesh On Mon, 9 Dec 2024 at 8:57 PM, dave-csc (via GitHub) <[email protected]> wrote: > > GitHub user dave-csc added a comment to the discussion: Right set of > transform for actions based on satisfying multiple conditions. > > Probably not the most efficient way, but I would try this, provided that > the data files include a primary key in other fields (different from Outlet > name, GST and Phone): > > 1. Read the two files and sort each one by their primary key, using **Sort > rows** > 2. Merge the sorted streams using a **Merge join** transform, use the > primary key as join field: this will give you the corresponding rows > attached together (in step 5 you can eventually strip out the duplicate > columns). An `inner join` would merge only the data that have the same > primary key in both files, if you want to keep those in the first (or > second) file anyway, use a `left` (or `right`) `join`. > 3. Add a **User Defined Java Expression** transform, and add three > `Boolean` fields with expressions like `outlet_name.equals(outlet_name_1)` > (use the expression editor to have a guide) and name like `flag_outlet_name` > 4. In the same latter transform add another `Boolean` field named > `send_to_bucket`, the expression will be something like `(flag_outlet_name > && flag_gst) || (flag_gst && flag_phone)` > 5. You may want to add a **Select values** transform, to strip out all the > useless fields you do not need in the buckets > 6. Finally, link to a **Filter rows** and evaluate `send_to_bucket`: > `true` (`Y`) will be sent to bucket 1, `false` (`N`) to bucket 2 > > Hope this helps > > GitHub link: > https://github.com/apache/hop/discussions/4683#discussioncomment-11509870 > > ---- > This is an automatically sent email for [email protected]. > To unsubscribe, please send an email to: [email protected] > >
