Multi Load to STAGE Table at the same time making a check if Load is completed
Hi to Every one.
I have two STAGE Tables ,where i have to load the data from FILE to Table , usling MultiLoad TPT.Till here it works good for me.
Now I have to write a listener whose Job is to check if any records are Loaded in the STAGE Table , if records exist it will perform some other operation.My concern is as i use Multi Load , till the Load is complete to STAGE , I am uable read the data from the STAGE Table , if i fire the query on STAGE table, the query keeps running.The Query will bring result only after sucessfull completion of Stage Load.
In STAGE 1, i am trying to Load 10 Million records
In STAGE 2,I am trying to Load 50,000 Records
Now i have written a procedure , which calls continuously through scheduler , I make a check If STAGE 1 table has data,If i see Load is in Still Progress ,i should proceed with Next step i.e to Check If STAGE 2 Tables has data , If it has data it will perform other operation , and this cycle continous . I just dont want my PROCEDURE to hung, as the FILE to STAGE Loading is in progress.
Please let me know if i have to follow any other approach to achieve the functionality.