Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I want to store my existing csv file format to qvd format. I have five 10 csv files. Daily i will upload this 10 csv files into my dashboard. How to achieve this?
Thanks in Advance!!
hi,
for each vFile in FileList('*.csv')
let vQVD = replace(vFile, '.csv', '.qvd');
if alt(FileSize('$(vQVD)'), 0) = 0 then
NextFile:
LOAD
*
FROM $(vFile)
([... CSV format in here ...])
;
STORE NextFile INTO $(vQVD) (qvd);
DROP TABLE NextFile;
end if
You can load CSV files as many as required..
If you are talking about just creating QVD, it is one time activity, like
set Path='C:\Documents'; Path for storing QVDS
CSV_File1:
Load
*
From CSV_File1;
store CSV_File1 into $(Path)\CSV_File1.qvd; //This statement will create a QVD of File 1
In the same way you can replicate it for multiple CSV files...
Hope this will help!!
Hi Jack,
Try,
sub ScanFolder(Root)
for each FileExtension in 'csv'
for each FoundFile in filelist( Root & '\*.' & FileExtension)
Let FileName = Replace(subfield('$(FoundFile)','\',SubStringCount('$(FoundFile)','\')+1),'.csv','');
Data:
LOAD *
FROM
[$(FoundFile)]
(txt, codepage is 1252, embedded labels, delimiter is ',', msq);
STORE Data into $(FileName).qvd;
Drop table Data;
next FoundFile
next FileExtension
end sub
Call ScanFolder('C:\Users\Tamilarasu.Nagaraj\Desktop\New folder (2)') ;
Change the file path in last line (Call ScanFolder(Your File Path)).
All csv files will be stored as qvd filefromat with the csv file name.
Hi Jack,
Follow the steps:
1. Load your csv file.
2. Say your file name is ABC.csv,
in edit script write:
Data:
Load *
from [<your path>\*.csv]
STORE Data into [<your path>\Data.qvd](qvd) ;
If you want to add the new data to the existing qvd then go for incremental load.
Incremental reload and store into QVD file
Regards,
Anjali Gupta