Guys,
I need to extract some records from a source system. I need to do this once the invoice run has completed. The way that I can identify the invoice run has completed is when a record gets written into the audit log on the database.
The way that I'm considering do is to create a batch that runs a job multiple times that reads the table and if the record exists this will write a file into a directory and exits if successfull otherwise keeps looping.
Another sequence will have a waitforfile stage that picks up the trigger file and runs the jobs.
Can you think of a slicker way of doing the same thing?
Thanks
Starting a job on the arrival of a record in an Oracle table
Moderators: chulett, rschirm, roy
Whatever way you can make work and are able to support is slick enough. I've done something very much like that, then used DSGetLinkInfo to see if the fishing trip was successful or not. Seems like WaitForFile could be used just as easily if the presence of the file is the trigger.
However, keep in mind the fact that a Server job writing to a file will always create the file when the job starts. Which is why I checked to see if the file was populated rather than simply existed.
However, keep in mind the fact that a Server job writing to a file will always create the file when the job starts. Which is why I checked to see if the file was populated rather than simply existed.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 132
- Joined: Wed Mar 01, 2006 11:12 pm
- Location: Pune
Re: Starting a job on the arrival of a record in an Oracle t
I have worked on a similar requirement. My requirement was to run my jobs when a flag is set to 'Y' in the control table.iansta wrote:Guys,
I need to extract some records from a source system. I need to do this once the invoice run has completed. The way that I can identify the invoice run has completed is when a record gets written into the audit log on the database.
The way that I'm considering do is to create a batch that runs a job multiple times that reads the table and if the record exists this will write a file into a directory and exits if successfull otherwise keeps looping.
Another sequence will have a waitforfile stage that picks up the trigger file and runs the jobs.
Can you think of a slicker way of doing the same thing?
Thanks
I have created a function in Oracle which queries the table to check the flag. This function keeps on quering the table for a given time period say 3 hours(parameterised). This function I have called through the sql query of a database stage in once of the job which is my first job in the sequence. Once it finds the flag as Y it will set the userstatus as 'Y' for the job in the transformer.
Now in the second job of my sequence job i am checking the user status for previous job activyty and running my job based on it. If the flag is found to be N then the sequence job aborts after the given time period.
SMB