For my replication from the DataLake to local server I do the following:
- I use an IPA to kick off my replication to the Datalake.
- Within that IPA I loop, checking for: RedAlert (the flag on the replication set stating the replication is still running)
- If the RedAlert flag is not equal to 'true" then I write a completion file to the FTP server and the IPA ends.
- I monitor for the completion file via VisualCron and once the file arrives, I kick off the IONETL process to import to my local SQL server.
- After the ETL process is complete, I kick off a record count for each table in the DataLake and my local database, creating a comparison report.
- The whole process takes about 25 minutes, more than half of that is taken up by the record count of the DataLake.
I have observed my comparison report continually shows I have less records in my local than the DataLake, for 10 or 15 tables out of 500.
However, if I run the single IONETL transaction for one of those tables again, say 5 to 10 minutes after my comparison report is complete, I receive the "missing" records and the count matches between the DataLake and my local database.
The RedAlert != "true" does not occur until all work units have been processed through the Queue as shown in the Asynch monitor.
Is there a cache or a process working in the background that has not finished when the RedAlert flag is removed from the replication set? If there is, then is there a way to monitor it so I don't kick off my download until after it has completed?
In the meantime, I'm going to add a hard coded 5 minute delay between when the RedAlert is removed and I kick off the IONETL job(s). I'll be working on finding the "correct" wait time.
Thanks,
Polar Bear