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: 
Not applicable

Create QVDs from Text Files Script

Hi All,

I have a script that loops through .txt files and loads them in to QV see below:

For Each vFile in FileList('C:\data\*.txt')
invoiceData:
LOAD @1 as [Invoice Number],
@4 as [Invoice Date],
@5 as [Net Amt],
@6 as [Gross Amt],
FROM
[$(vFile)]
(txt, codepage is 1252, no labels, delimiter is '\t');
Next

The text file are huge in size and number so the script takes a long time to load. Also I have to load every text again if I want the full picture of data. So, what I want to do is to create another script that reads all of the text files and outputs the aggregated result in on QVD file. This I hope would speed things up! Any suggestions?

Thanks in Advance,

Sean

2 Replies
boorgura
Specialist
Specialist

Not just Text files,

for any format, I would assume creation of QVDs is the best approach.

Even better would be to read everything from the text file.

Then if you have any calculations to be done, then do it from the resident table and then store into a QVD.

martin59
Specialist II
Specialist II

Hello,

Try to store a QVD without aggregate and look if it's fast or not.

To create a qvd :

Store invoiceDate Into InvoiceData.qvd;


Martin