cancel
Showing results for 
Search instead for 
Did you mean: 

Delta loading in DS using Job Control table

Former Member
0 Kudos

Hi,

I am trying to achieve the delta loading by using Source table time stamp and target table max(insert date) with the help of job control table.

I have created script initialization and kept the below code in it. Source is Oracle and target is HANA.

When I execute the job, it's giving the below error.

Not sure if there is some issue with the code.

Regards,

Venkat N

Accepted Solutions (1)

Accepted Solutions (1)

former_member187605
Active Contributor
0 Kudos

You're passing the string '$CDC_TIME' instead of the parameter value. Put it in curly brackets like you do for the workflow name (you may have to convert it to a string first to get the correct date and time format).

The same will apply to your other variable '$SYS_TIME'.

former_member198401
Active Contributor
0 Kudos

Hi Venkat,

As Dirk said the variable $CDC_TIME is not getting passed correctly as a parameter value.

We can use the ifthenelse() function as below:

Get the value of job status from the control table in a variable called $STATUS

ifthenelse($STATUS = 'SUCCESS', sql('DS_HANA_CLARITY_TGT', 'select max(START_TIME) from CLARITY.SAPDS_JOBCONTROL_CDC WHERE WORKFLOW_NAME = {$WORKFLOW_NAME}'),SQL('DS_HANA_CLARITY_TGT', 'SELECT MAX(INSERT_DATE) FROM CLARITY.HSP_ACCOUNT'));

Regards

Arun Sasi

Former Member
0 Kudos

Thank you Dirk, it has worked.

Answers (0)