Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
peschu123
Partner - Creator III
Partner - Creator III

Determine source file(path) for already loaded tables

Hi,

I need to implement a function to see if my loaded source(file)s are up to date.

I have a "Cleanup Layer" where I create the data model which is used by multiple QV apps. As a result I can see the last correct load of a single QV app but I (or the end users) can't be sure if the underlying data is up to date.

Now I want to create a table (in my cleanup script).which loads filenames, filesize, filetime... etc.

I wondered if it is possible to determine the source file for already loaded tables so that I can create a table with the filenames to check the filesize() or filetime() and so on.

Unfortunatly it is not possible to take all files in the folder and subfolders

In case of filesize it would be necessary to save filesize from last load in a qvd to be able to compare the values.

Are there any best practices or documents on that topic?

Thanks in advance and best regards,

Peter

2 Replies
Not applicable

I've created a sub routine that will collect all source file info (names/paths) into which at the end of each data load in the script, call the sub and write back defined values which can then be pulled out into a reporting table.  This routine will also collect total numbers within each load.

  • NoOfRows(SourceTableName)
  • NoOfFields(SourceTableName)

The sub calls and writes the specific file name/data type (reporting)/the initial refresh date (which in my case is the MAX(LastModifiedDate) field.

peschu123
Partner - Creator III
Partner - Creator III
Author

Hi Baxter,

it would be nice if you have some code examples. This approach seems logic to me and I will integrate this in the long run.

But for now I have certain dependencies and I need a quick and basic(not dirty ) solution.I don't want to integrate this at the moment for each table and pull it again in another table.I will hard code the file(paths) for the relevant (most important) source files.

But thank you very much for sharing your thoughts on this topic.