Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All ,
i'm using this script for incrimental but this script giving error and i'm stuck to find error , if can anybody help then plz help to find the error
LOAD USER_NAME,
USER_ID,
LOGIN_TIME,
LOGIN_COUNT
FROM
(qvd);
last_updated_date:
LOAD
max(LOGIN_TIME) as max_date
Resident xx_login_rev_view;
let vmax =Peek(max_date,0,'last_updated_date') ;
drop Table xx_login_rev_view;
incrimental:
LOAD
USER_NAME,
USER_ID,
LOGIN_TIME,
LOGIN_COUNT
FROM APPS."XX_LOGIN_REV_VIEW"
where LOGIN_TIME > $(last_updated_date);
Concatenate
LOAD USER_NAME,
USER_ID,
LOGIN_TIME,
LOGIN_COUNT
FROM
(qvd);
store incrimental into
drop Table incrimental;
What is the exact error you are seeing? Can share the log file?
Hi Sunny ,
i attached script , i marked red on where condition as per my practice this is correct but it is showing error
Try putting quotes around variable like:
where LOGIN_TIME > '$(last_updated_date)' ;
Please check the date formatting while doing the comparison for field LOGIN_TIME and variable which you have created. Also as tresesco mentioned mentioned you need to put variable as mentioned.
use vmax here:
incrimental:
LOAD
USER_NAME,
USER_ID,
LOGIN_TIME,
LOGIN_COUNT
FROM APPS."XX_LOGIN_REV_VIEW"
where LOGIN_TIME > $(last_updated_date); //error is here
try this:
incrimental:
LOAD
USER_NAME,
USER_ID,
LOGIN_TIME,
LOGIN_COUNT
FROM APPS."XX_LOGIN_REV_VIEW"
where LOGIN_TIME > $(vmax);
It looks like the 'incremental' table is being loaded from database. In that case, you need:
incrimental:
SQL SELECT
USER_NAME,
USER_ID,
LOGIN_TIME,
LOGIN_COUNT
FROM APPS."XX_LOGIN_REV_VIEW"
where LOGIN_TIME > '$(vmax)';
you will also need to CONNECT statement before the load statement to make a connection to the database.
HI,
date format is same , the problem with where condition.
Did you try my suggestion?
Dear Jonathan,
i tried the same which you suggested but still its not working , plz find the attached