Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear experts,
I have list of QVDs being loaded everyday ,It works fine so far. Now I have a situation where I have to add new fields in the source files and subsequently QVDs needs to changed by adding new fields ,
Issue : New fields will be available only in the new qvds ( not in the old qvds).
If I change my script to add new fields it works fine for new QVDs but failed for old once as old Qvds missing new fields ( which is fine).
I handled this previously by checking the date ( IF ELSE...) , which means whenever I have new field added in the source file or in the Qvds , I have to add new condition in the ELSE part. I don't want to do that.
Is there any better way to handle this scenario. I am looking for a dynamic solution where I don't have to change the script when I have new field added apart from the fact that I have to include the new fields in the script .
Thanks for your help/input in advance.
Cheers,
Bob
Hi Folks ,
I managed to make it work 🙂
Here is the solution
For each File in FileList('C:\*.qvd')
i=i+1;
if i=1 then
Data:
LOAD * FROM [$(File)] (qvd);
ELSE
Concatenate
Data:
LOAD * FROM [$(File)] (qvd);
Endif
next File
I use counter "I" to execute first load statement without concatenate as i have another table being loaded just before this load.
Thanks ,
SS
Hi Folks ,
I managed to make it work 🙂
Here is the solution
For each File in FileList('C:\*.qvd')
i=i+1;
if i=1 then
Data:
LOAD * FROM [$(File)] (qvd);
ELSE
Concatenate
Data:
LOAD * FROM [$(File)] (qvd);
Endif
next File
I use counter "I" to execute first load statement without concatenate as i have another table being loaded just before this load.
Thanks ,
SS