云服务器价格_云数据库_云主机【优惠】最新活动-搜集站云资讯

中间件_潍坊企业网站建设_最新活动

小七 141 0

中间件_潍坊企业网站建设_最新活动

In BODS, we sometimes face requirements like executing Job1 upon successful completion of which, Job2 should be triggered and so on for Job3.

(In data warehousing, we may have jobs that load dimension tables and some jobs those are loading fact tables. So we need to schedule jobs such that all the dimension jobs should get completed successfully, on the basis of which fact loading jobs can be started)

In order to fulfil such requirements, we have 2 approaches.

We can create a control tables which will maintain the status of jobs running and same are updated with the BODS jobs.

BODS internally maintaining Metadata tables in which we can find job status whether it is running,failed or successfully completed.

AL_HISTORY table is the internal table maintain by BODS, having information related to jobs that are running.

Table structure is as follows:

This metadata table of BODS consists of all the job status whether they are running or completed or terminated because of some error.

I have created a test job and I will show how to get job status from AL_HISTORY table.

The job name is: J_ERROR_HANDLING.

When I run the job and trigger a query such as

SELECT * FROM al_history KWHERE upper(k.service) = ‘J_ERROR_HANDLING’);

, my result set is as follows:

If I wish to get status for latest instance then following query needs to be triggered:

SELECT * FROM al_history iWHERE i.object_key IN (SELECT MAX(k.object_key) FROM al_history kWHERE upper(k.service) = ‘J_ERROR_HANDLING’);

Result:

So by using AL_HISTORY table, we can easily get latest instant of any job running and using that status we can schedule other dependent jobs.

,物联网智能水表,北京大数据公司,淘客模板,淘客推广联盟,淘客大联盟