Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I have 10 qvd files. I need to make them as single qvd file. Could you please any one describe this?
Hi,
you can do something like:
ALL_QVD:
load null() as dummy autogenerate(0);
// this is needed for making the concat afterwards
for each qvd_file in filelist ('c:\your_qvd_dir\*.qvd')
concatenate (ALL_QVD)
load *
from $(qvd_file) (qvd);
next qvd_file
drop field dummy;
store ALL_QVD into ALL_QVD.QVD;
Take a look on syntax because I don't have test it.
Hope that help!
Andrea
Why do you need to build them into one? what's the problem on keeping them separated?
You Could simply say,
Test_QVD:
Load *
From
Store Test_QVD into [TEST\Final.QVD];
This should work.
-Sridhar
Sridhar, that will only work if all qvd files have the same fields, if not you will end up having Test_QVD_1, Test_QVD_2, etc.
Andrea's answer is more generical in that regard.
Exactly, my solution will work when the field names are same in all QVD`s.
When siva.boggarapu said about concatenating all the QVD`s in to one QVD, I have assumed that he may have the same field names in all QVD`s.
Moreover if the Qvd`s has different field names, then my code will create a QVD only for the 1st loaded table and it will not create a QVD for subsequent loaded tables.
Apologies for my misunderstandings and i accept Andrea`s answer is more generical in that regard.
- Sridhar
I use this solution more generally for TXT or XLS files. I just propose it because is , as you said, more generic.
In fact the Sridhar method is quite more efficent if the case of same fields.
Andrea
Hello Danielato,
Could you please understand my requirement. I need to make them as single qvd file. Is it possible?
Load *from [..\Data Loader\Loader OverUnder\QVD\OverUnderFDUS2011.qvd](qvd);
Load *from [..\Data Loader\Loader OverUnder\QVD\OverUnderSTAFF2011.qvd](qvd);
Load *from [..\Data Loader\Loader OverUnder\QVD\OverUnderILS2011.qvd](qvd);
Load *from [..\Data Loader\Loader OverUnder\QVD\OverUnderETCA2011.qvd](qvd);
Load *from [..\Data Loader\Loader OverUnder\QVD\OverUnderFDCA2011.qvd](qvd);
Load *from [..\Data Loader\Loader OverUnder\QVD\OverUnderSTCA2011.qvd](qvd);
Load *from [..\Data Loader\Loader OverUnder\QVD\OverUnderGACA2011.qvd](qvd);
Siva,
Shridar already answered you here. Your code, would look like
// This loads all files in one table
TempLoad:
LOAD *
FROM [..\Data Loader\Loader OverUnder\QVD\OverUnder*.qvd] (qvd);
// This stores all previous QVDs in one
STORE TempLoad INTO [..\Data Loader\Loader OverUnder\QVD\CompleteFile.qvd];
Credits to Shridar.
Hope that helps.
BI Consultant
Hi,
if in the directory you have only the qvd that you mention you can do:
ALL_QVD:
load null() as dummy autogenerate(0);
// this is needed for making the concat afterwards
for each qvd_file in filelist ('..\Data Loader\Loader OverUnder\QVD\*.qvd')
concatenate (ALL_QVD)
load *
from $(qvd_file) (qvd);
next qvd_file
drop field dummy;
store ALL_QVD into ALL_QVD.QVD;