Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
yadav_anil782
Creator II
Creator II

Incremental load error

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;

23 Replies
sunny_talwar

What is the exact error you are seeing? Can share the log file?

yadav_anil782
Creator II
Creator II
Author

Hi Sunny ,

i attached script , i marked red on where condition as per my practice this is correct but it is showing error

tresesco
MVP
MVP

Try putting quotes around variable like:

where LOGIN_TIME > '$(last_updated_date)' ;

Not applicable

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.

Anonymous
Not applicable

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);

jonathandienst
Partner - Champion III
Partner - Champion III

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.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
yadav_anil782
Creator II
Creator II
Author

HI,

date format is same , the problem with where condition.

Anonymous
Not applicable

Did you try my suggestion?

yadav_anil782
Creator II
Creator II
Author

Dear Jonathan,

i tried the same which you suggested but still its not working , plz find the attached