Skip to main content
Announcements
Announcing Qlik Talend® Cloud and Qlik Answers™ to accelerate AI adoption! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mike_spada
Contributor III
Contributor III

Qvd with historicize (validity date)

Hi,

I have this scenario: I load data (category and item code) every day. Of course I can easily add the extraction date, and I am able to load past data from qvd and concatenate them with the ones with today date 

CategoryItem CodeExtraction date
A11108/06/2019
B22208/06/2019
C33308/06/2019

 

Catalog_history:
LOAD *
FROM
Catalog_history.qvd
(qvd);

Concatenate

LOAD *,
'$(vToday)' as ExtractionDate
;
LOAD
[Item Code],
Category
FROM
Item.qvd(qvd);

store Catalog_history into Catalog_history.qvd(qvd);

(vToday previously declared as today date):

 

 

If tomorrow a catalog will change, I expect to have somthing like this:

CategoryItem CodeExtraction date
A11108/06/2019
B22208/06/2019
C33308/06/2019
B11110/06/2019

 

 

I'd like to have a result like this:

CategoryItem CodeExtraction dateValidity startValidity end
A11108/06/201901/01/201409/06/2019
B22208/06/201901/01/201431/12/2070
C33308/06/201901/01/201431/12/2070
B11110/06/201910/06/201931/12/2070

 

where the modified data can be closed with Today-1 and a new row can be added with validity start date = today.

Has anybody got an idea to do this?

Thanks in advance!

Mike

 

0 Replies