Data Source Query jobs to pull data into the ICA Staging area are will be executed on a set schedule defined by the end-user. The data source query scheduled can be set to run on an hourly, daily or weekly basis. The SQL Server Agent job ‘RiskFabric – Integration Wizard DataSource Query Manager’ job is tasked with querying the ‘IW_DataSourceQuery’ table to determine if it is time to bring data into the ICA staging area. When the When the Column DisabledDate is null, the JobIntervalMinutes > 0, the JobStatusFlag <> ‘R’ and the JobLastRunDate, JobStartDate are compared against the GetDate() function to determine if the difference exceeds the defined in the column JobIntervalMinutes column. When these conditions are met, the the JobIsRunnable flag will be set to 1. When the JobIsRunnable field is set to 1 the data source query will be invoked by the RiskFabric – Integration Wizard DataSource Query Manager job.
To Determine the status of a data source query job, you will need to evaluate the value set in the JobStatusFlag field for the data source query. There are three potential statuses that the JobStatusFlag can contain. The status flag will either be set to a value of ‘R’ for running, ‘C’ for complete or a value of ‘F’ for failure. In the event that the data source query results in a JobStatusFlag=’F’, you will need to execute the following queries against the ‘IW_DataSourceQuery’ table to review the status of the query and then you will need to query the ‘vIW_DataSourceQueryHistory’ view to obtain a complete history of the data source query.