Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
shree909
Partner - Specialist II
Partner - Specialist II

Incremental Loading daily.

Hi  guys,

i am looking to do incremetnal loading daily.

i want to do it on date field

Dim:

LOAD

     UNIQUE_ID,

      DATE,

     [System Name],

     VALUE,

     Area,

     Vendor

FROM

..\abc\QVDs\Dim.qvd(qvd);

i want to do it on date..

i have gone through the community and found it something like this but its not working.. can u correct me where i am going wrong

=========================Dim====================

Dim:

LOAD

     UNIQUE_ID,

      DATE,

     [System Name],

     VALUE,

      Area,

     Vendor

FROM

..\abc\QVDs\Dim.qvd(qvd);   // this is the qvd which was loaded from this i am calulating the max date

Temp:

load max(K_DATE) as Max_Date

resident Dim;

drop table Dim;

let vmax =peek(Max_Date,-1,Temp);   /// this vmax is not loading into the qlikview i dont know why

LOAD

     UNIQUE_ID,

      DATE,

     [System Name],

     VALUE,

      Area,

     Vendor

FROM (date base table);   //// loading from date base which is  on daily basis

where DATE >$(vmax )

concatenate

Dim:

LOAD

     UNIQUE_ID,

      DATE,

     [System Name],

     VALUE,

      Area,

     Vendor

FROM

..\abc\QVDs\Dim.qvd(qvd); /// previously loaded qvd file concatenating with the  new records on the date field..

and then storing and droping the table... but the problem is when i am uing the $(Vmax) variable is not loading into qlikview.

i am not sure this is the correct way of doing incremental loading or somehting else has to be done..

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

A couple of comments:

1. Can you confirm that the Temp table actually contains a row with a Max_Date value?

2. You should have single quotes around your peek() params.

let vmax =peek('Max_Date',-1,'Temp');

View solution in original post

9 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

A couple of comments:

1. Can you confirm that the Temp table actually contains a row with a Max_Date value?

2. You should have single quotes around your peek() params.

let vmax =peek('Max_Date',-1,'Temp');

Not applicable

HI Shree,

Please check K_Date is present in the DIM table.

You are taking max(K_DATE) as Max_Date from DIM table but i am not seeing the K_DATE in Dim table.

Thanks,

Sampath.

Not applicable

Hello Shree,

Peek() syntax is incorrect.

 

 

Regards,

yaseen

let vmax = PEEK('Max_Date',-1,Temp);

Not applicable

Please find the atatched Doc.

shree909
Partner - Specialist II
Partner - Specialist II
Author

Hi  Rob

Thanks for correcting me..

can u suggest me this is this  the best one for incremental loading  which is daily job  or somehting else u suggest

Thanks

shree909
Partner - Specialist II
Partner - Specialist II
Author

i have an issue from the qvd file i am getting date format as 02/01/2013

when i am comparing with the database date its showing as 01-FEB-2013 which is oracle..

so what i need to do either i convert date format in datase its saying not matching up or is ther a way in qv we can show the date format as  01-FEB-2013.. i used DD-MMM-YYYY its showing as 02-feb-2013..

any idea

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I'm not an oracle expert but here is what I've used as  the SQL WHERE for Oracle in the past.

'>= TIMESTAMP ' & chr(39) & timestamp($(vmax), 'YYYY-MM-DD hh:mm:ss') & chr(39);

-Rob

Not applicable

Hello Shree,

Please find the doc attached.

I have changed the date format in qv as you required in Oracle.

Regards,

yaseen

Not applicable

Hello,

Can this be done pulling data from SAP?