Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I am implementing Incremental load by following procedure mentioned as per below link but I am getting "Table not found error", this error is occurring in below highlighted section inside script, it seems that table "Incremental" is not getting created
I have attached screenshot of Data model and source data file, I have highlighted two new records which belongs to date 16th Jun 2016 in attached source data file which I want to load using incremental load method
Link: http://www.analyticsvidhya.com/blog/2014/09/qlikview-incremental-load/
Script:
/*Product:
LOAD Product_Id,
Product_Name,
Product_Type,
Order_Id,
Modified_Date
FROM
(ooxml, embedded labels, table is IMS_Product);
STORE Product into Product.qvd(qvd);
*/
Product:
LOAD
Product_Id,
Product_Name,
Product_Type,
Order_Id,
Modified_Date
FROM
Product.qvd(qvd);
Last_Updated_Date:
LOAD Max(Modified_Date) as Max_Date
resident Product;
Let Last_Modified_Date=peek('Max_Date',0,'Last_Updated_Date');
Incremental:
LOAD
Product_Id,
Product_Name,
Product_Type,
Order_Id,
Modified_Date
FROM
(ooxml, embedded labels, table is IMS_Product) WHERE Modified_Date>$(Last_Modified_Date);
Concatenate
LOAD
Product_Id,
Product_Name,
Product_Type,
Order_Id,
Modified_Date
FROM
Product.qvd(qvd) WHERE not Exists(Product_Id);
Data Model:
Because all of your fields in the Product and Incremental tables are the same, it's automatically concatenating everything from the Incremental table to the Product table that is already loaded in. If you do not want it to automatically concatenate the two, use the keyword "NOCONCATENATE" before your LOAD:
Incremental:
NOCONCATENATE LOAD
Product_Id,
...
Because all of your fields in the Product and Incremental tables are the same, it's automatically concatenating everything from the Incremental table to the Product table that is already loaded in. If you do not want it to automatically concatenate the two, use the keyword "NOCONCATENATE" before your LOAD:
Incremental:
NOCONCATENATE LOAD
Product_Id,
...
Thanks Nicole , above works fine
Please suggest how to implement incremental load in case of real time scenario where we have more than one table to upload on daily basis
Hi VSharma,
/* Product:
LOAD Product_Id,
Product_Name,
Product_Type,
Order_Id,
Modified_Date
FROM
C:\Users\admin\Downloads\IMS_Data.xlsx
(ooxml, embedded labels, table is IMS_Product);
STORE Product into Product.qvd(qvd);
*/
Product:
LOAD Product_Id,
Product_Name,
Product_Type,
Order_Id,
Modified_Date
FROM
D:\QlikView\Product.qvd
(qvd);
Last_Updated_Date:
LOAD Max(Modified_Date) as Max_Date
resident Product;
drop Table Product;
Let Last_Modified_Date=peek('Max_Date',0,'Last_Updated_Date');
Incremental:
LOAD Product_Id,
Product_Name,
Product_Type,
Order_Id,
Modified_Date
FROM
C:\Users\admin\Downloads\IMS_Data.xlsx
(ooxml, embedded labels, table is IMS_Product)
WHERE Modified_Date>$(Last_Modified_Date);
Concatenate
LOAD
Product_Id,
Product_Name,
Product_Type,
Order_Id,
Modified_Date
FROM
Product.qvd(qvd) WHERE not Exists(Product_Id);
STORE Incremental into Product.qvd(qvd);
drop Table Last_Updated_Date;
Hi lalit,
Above mentioned procedure is for single table, please suggest how to implement incremental load in case of more than one table like in live projects where we used to receive records to upload on daily basis
Hi Vsharma,
In live project we normally use 3 tire architecture and at stage1 we write incremental load script for each table separately.
Regards,
Lalit kumar
Thanks lalit, so in this case there should be multiple QVDs associated with single dashboard, please correct me if I am wrong
Also, please suggest how do we proceed further with these QVDs in remaining 2 tiers like I mean from development environment to production