I have two process groups
P1 - Reads a csv file and inserts data into postgres table
P2 - Reads another csv file and updates data into the same postgres table based on a common key
I want P2 process group to start only when P1 process group has finished inserting all the rows of the csv file into the table
Example: I have a csv file with 100 lines so after P1 finishes inserting 100 rows to the db i want the P2 processor to start executing and update those rows with new data.
How can I achieve this in nifi?