Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
DataHound
Contributor II
Contributor II

Only Load Row Containing the Maximum Value for a Date from QVD

I am looking to load one row from a list of QVDs. The goal is to provide a simple table that lists the Reload time of the QVD, the Last_Updated_Date, and the maximum date value for the data in the QVD. 

For example, if I am loading a QVD containing sales data. I would like to pull in the Maximum date any sale occurred, the value of its maximum last updated date, and also the reload time of the QVD.

The problem I have here is that the load editor wants to evaluate and load all records to determine the maximum values of the dates. I'm trying for the most efficient way of loading this data. 

Labels (3)
1 Solution

Accepted Solutions
marcus_sommer

With functions like: qvdcreatetime() or filetime() you could fetch the information from the file meta-data from Qlik respectively from the OS.

But it's not possible on this way to get direct information from any data within the file. The most efficient way to get this information is to read and store them after the data-load for the qvd-creation was performed. The information might be stored within a separate table or within variables or even within the filename of the qvd. If it's stored within the filename() you could use filebasename() to fetch the information and apply any extracting-logic to get only your wanted information.

The max. value of a field could be very efficient obtained - just by reading it from the system-table. But if this value is needed in regard to any other field the system-tables could be only used if there is a 1:1 relationship between these fields. If this isn't the case you will need to query the data-table with an aggregation-load.

- Marcus

View solution in original post

2 Replies
marcus_sommer

With functions like: qvdcreatetime() or filetime() you could fetch the information from the file meta-data from Qlik respectively from the OS.

But it's not possible on this way to get direct information from any data within the file. The most efficient way to get this information is to read and store them after the data-load for the qvd-creation was performed. The information might be stored within a separate table or within variables or even within the filename of the qvd. If it's stored within the filename() you could use filebasename() to fetch the information and apply any extracting-logic to get only your wanted information.

The max. value of a field could be very efficient obtained - just by reading it from the system-table. But if this value is needed in regard to any other field the system-tables could be only used if there is a 1:1 relationship between these fields. If this isn't the case you will need to query the data-table with an aggregation-load.

- Marcus

DataHound
Contributor II
Contributor II
Author

Thank you Marcus. This was very helpful!