You can translate the question and the replies:

Run Scheduler Job Based on Value from a Query

Hello, Is it possible to allow a Denodo Scheduler job to start only when the value returned by a query indicates it is ok for the job to start? The scenario is as follows: We want to cache a Denodo view. However, before we can start the cache job, we need to first check if the source table has a complete set of records. If the source table has everything, then it is ok for the Denodo cache job to start. Otherwise, the Denodo cache job should retry again in the next 10 minutes. After 4 hours of retry, abandon the attempt to cache. How do we know if the source table has everything? We check the job status that loads data into the Denodo's source table. So whatever is returned by this check determines whether or not the Denodo cache job should run.
19-05-2020 02:46:23 -0400

1 Answer

Hi, To achieve this, I would make use of Dependencies among Scheduler jobs. I would configure two scheduler jobs for this purpose: * First configure a JDBC job with the JDBC data source where the source table is present, to get the job status of the job that loads data into the source table. Note that this query should be written in such a way that it fails unless the job status that loads data in the source table is complete. This is because it’s a job dependency which means the dependent job will not run unless the main job is complete so even if the load job status is returned as “not complete” the scheduler will mark the JDBC job as complete since the query was executed successfully and it will trigger the cache job to run. For e.g.: In the Retry section, configure the “Delay between execution” as 10 minutes and “Maximum number of retries” to the desired value. * After that, configure a VDPCache job with VDP as a data source to load the cache in Virtual DataPort. In the trigger tab, specify the JDBC job in the dependencies section. This way the cache job will run only when the JDBC job returns the desired status. Refer the documentation onr [Dependencies among Jobs]( for further details on how to configure job dependencies in Scheduler.. Hope this helps!
Denodo Team
27-05-2020 08:21:52 -0400
You must sign in to add an answer. If you do not have an account, you can register here