sales_order | item_code | description |
---|---|---|
100 | 1 | Item 1 |
100 | 2 | item 2 |
100 | 3 | Item 3 |
100 | 4 | Item 4 |
I receive a sales order list in this format and I need to register it in two tables, one for sales order and another for sales order items. But before registering, I need to check the sales order table if there is a sales order. If it exists, discard it, otherwise register.
But NIFI processes all flow files at once in each processor where all flowfiles are as not found, and at the time of recording generate duplicate key error, because the sales order has already been registered by the first flowfile.
Is there a way to generate a loop for him to do the second search, only if the first one was executed?