First Script: Job - Contact
First Script: Job - Contact
First Script: Job - Contact
Benefits
1) Same job can be used for Full load and Incremental load, thus reducing the number of jobs.
2) The use of control table for determining the last_update date improves the job performance
and reduces execution time.
Sample Job
JOB_CONTACT
First Script
Final script
$Last_update_date_target=sql('SRC_SALES_DS','SELECT MAX(UPDATION_DATE) from CONTACT
WHERE UPDATION_DATE > to_date(\'[$LAST_UPDATE_DATE]\',\'yyyy-mm-dd\') ');
During the CR deployment, a new row has to be inserted in the control table
MAX_VALUE = ‘1900-01-01’
LOAD_TYPE_FLAG=’F’
After the first job run, the MAX_VALUE and LOAD_TYPE_FLAG gets updated as below
MAX_VALUE =last_update_date
and LOAD_TYPE_FLAG = ‘I’
SELECT
count(*)
from src_crm.S_OPTY_HIST
WHERE last_upd > to_date('2016-07-28', 'yyyy-mm-dd'); --214