Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a loader application that takes in so many countries and dates etc.
I then have 4 Archived countries from 201409 that I need to concatenate to say 201502 and 201505 (Fiscal Calendar).
So when the loader compiles, it would recognise that UK, IE, IT and PL countries are part of the 201502 and 201505 load and will append on to these (if I am making sense).
e.g.
CH 201502
NO201502
PT 201502
IE 201502 - found an IE file and appends on the 201409 file
FR 201502
PL 201502 - found an PL file and appends on the 201409 file
SE 201502
IT 201502 - found an ITfile and appends on the 201409 file
UK 201502 - found an UK file and appends on the 201409 file
I have concatenated the 4 files but I don't think what I want to do is working.
I have simply loaded the files and then concatenated the 4 additional files. Nothing fancy but this isn't working.
When I go to my main application after I have loaded the QVDs from the loader, the 4 files are still recognised as from 2014 when in fact they should now be part of the 201502 and also the 201505 group.
Any help appreciated
Hi,
I'm afraid I do not yet quite understand your requirement:
- Which file are you trying to append to which other file and
- is that dependent on some condition (that tells you which file to append to which one)?
If I understood correctly, your file name is calendar year and Your data has Fiscal year or Vice versa.
///////////////////////////////////////////////
// This will load ALL Country files //
////////////////////////////////////////////////
E_Tia_Reports_Validity:
LOAD @1 as [Country Code],
@2 as [Accounting Period],
@3 as [Product Type],
@4 as [Status],
@5 as Product,
@6 as Validity.Name,
if(@6='POLICY',1) as isPolicy,
@7 as Validity.Value,
if(@6='POLICY',@7,0) as [Policy No],
@8 as CheckNo,
@9 as Validity.ErrorCode,
@10 as Validity.Error,
@11 as Validity.ErrorValue,
'Policy Extract' as [Validity Source]
FROM
[$(vDGDPath)\PE_*_Data_Anomalies_PerPolicy*.csv]
(txt, codepage is 1252, explicit labels, delimiter is ',', msq, header is 1 lines);
///////////////////////////////////////////////
// This will load 4 Country files //
////////////////////////////////////////////////
Concatenate
LOAD @1 as [Country Code],
@2 as [Accounting Period],
@3 as [Product Type],
@4 as [Status],
@5 as Validity.Name,
if(@5='POLICY_NO',1) as isPolicy,
@6 as Validity.Value,
if(@5='POLICY_NO',@6) as [Policy No],
@7 AS CheckNo,
@8 as Validity.ErrorCode,
@9 as Validity.Error,
@10 as Validity.ErrorValue,
'Non Life Valuation Extract' as [Validity Source]
FROM
[$(vDGDPath)\NLV_*_Data_Anomalies*.csv]
(txt, codepage is 1252, explicit labels, delimiter is ',', msq, header is 1 lines);
I have a number of files. They all have the same explicit headings.
I load all the files for 201502 and 201505 and to each. I am concatenating 4 files from 201409 but its dependant on whether the country matches
So say I have a number of files and each has a country associated with it.
File1 has Denmark201502
File2 has Ireland201502
File3 has France201502
File4 has Sweden201502
File5 has Poland201502
File6 has Italy201502
File7 has Germany201502
File8 has UK201502
My four additional files are Ireland201409, Poland201409, Italy201409 and UK 201409
Files 1-8 load but while going through, it realises, hey File2 needs to have Ireland201409 added, loops through and then says File5 needs Poland201409, File6 and File 8 need Italy201409 and UK201409 added on.
This is all Fiscal Year calendar.
I have a number of files. They all have the same explicit headings.
I load all the files for 201502 and 201505 and to each. I am concatenating 4 files from 201409 but its dependant on whether the country matches
So say I have a number of files and each has a country associated with it.
File1 has Denmark201502
File2 has Ireland201502
File3 has France201502
File4 has Sweden201502
File5 has Poland201502
File6 has Italy201502
File7 has Germany201502
File8 has UK201502
My four additional files are Ireland201409, Poland201409, Italy201409 and UK 201409
Files 1-8 load but while going through, it realises, hey File2 needs to have Ireland201409 added, loops through and then says File5 needs Poland201409, File6 and File 8 need Italy201409 and UK201409 added on.
This is all Fiscal Year calendar.