Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Issue with incremental load

Hi,

I am trying to load data greater than a certain date as incremental to the previous load.

The step I followed is

1. Stored the previous load as a qvd

2. Load the qvd

3. Get max date

4. Load the new data where date is greater than max date from previous loaded qvd file.

I am getting an error field <vMax> not found. Below is the script. Does anyone know what could be happening and how to resolve this issue.

Thanks,

Deepak

Temp:
LOAD * from Sales_Fact.qvd (qvd);
Res:
LOAD Max(%_Day_Date_ID) as MaxDate
RESIDENT Temp;
let vMax=peek('MaxDate',-1,'Temp');

Directory;
Sales_Fact:
LOAD TEXT(Terr_id) as %_Terr_ID,
     TEXT(Brand) as %_Brand_ID,
     DATE(w_date) as %_Day_Date_ID,
     NUM(sales) as FCT_sales

FROM
[sales_inputs - we4-20-12.csv]
(txt, codepage is 1252, embedded labels, delimiter is ',', msq)
WHERE
DATE(w_date) > vMax;

Concatenate

LOAD * from Sales_Fact.qvd (qvd);

0 Replies