Dear SCN Members,

Recently we have a requirement of reading a .csv file from third party file server whose columns may jumble and first row/record tells you the column names.I have developed this Interface with the below approach .It worked effectively with small and medium sized files .

Reading a delimeter separated file whose columns may jumble

During Testing phase we come to know from Business that we can expect 15 to 30 mb file and only 1 file will get processed in a month .We tried to test the interface with 30 mb file ,because of this java stack went to hung state .So I have been asked to fine tune the code that would be able to process huge files.I want to share my knowledge on this .This concept will help us to understand how to handle our code for huge files processing .

Follow the below step to achieve these kind of requirements.

Read the CSV file by using normal FCC.

Map.JPG

Pass all Source field values and No of cols as an Input to the below udf and get the respective jumbled values as an output from udf and map those values to respective target fields.

NOTE:Core Logic for Jumbling will remain the same as explained in my previous blog ,but here Instead of taking entire payload in a array variable for jumbling I’m taking 10 records at a time and applying jumbling logic and processing further .

UDF:I have used the below udf for passing the values to apt fields in the target structure.


public void Colum_Reorg(String[] Fld1,String[] Fld1, String[] Fld2, String[] Fld3, String[] Fld4, String[] Fld5, String[] Fld6, String[] Fld7, String[] Fld8, String[] Fld9, String[] Fld10, String[] Fld11, String[] Fld12, String[] Fld13, String[] Fld14, String[] Fld15, String[] Fld16, String[] Fld17, String[] Fld18, String[] Fld19, String[] Fld20, String[] Fld21, String[] Fld22, String[] Fld23, String[] Fld24, String[] Fld25, String[] Fld26, String[] Fld27, String[] Fld28, String[] Fld29, String[] Fld30, String[] Fld31, String[] Fld32, String[] Fld33, String[] Fld34, String[] Fld35, String[] Fld36, String[] Fld37, String[] Fld38, String[] Fld39, String[] Fld40, String[] Fld41, String[] Fld42, String[] Fld43, String[] Fld44, String[] Fld45, String[] Fld46, String[] Fld47, String[] Fld48, String[] Fld49, String[] Fld50, String[] Fld51, String[] Fld52, String[] Fld53, String[] Fld54, String[] Fld55, String[] Fld56, String[] Fld57, String[] Fld58, String[] Fld59, String[] Fld60, String[] Fld61, String[] Fld62, String[] Fld63, String[] Fld64, String[] Fld65, String[] Fld66, String[] Fld67, String[] Fld68, String[] Fld69, String[] Fld70, String[] Fld71, String[] Fld72, String[] Fld73, String[] Fld74, ResultList AcctEntryId, ResultList ValueDate, ResultList Entity, ResultList Folder, ResultList DenomCcy, ResultList FunctCcy, ResultList TradeId, ResultList TradeVersion, ResultList TradeType, ResultList LinkId, ResultList LinkVersion, ResultList Counterparty, ResultList AcctProcess, ResultList CashAccount, ResultList AcctEntryDescr, ResultList ReversesAcctEntryId, ResultList AcctEntrySubSysId, ResultList DenomCcyAmount, ResultList FunctCcyAmount, ResultList AcctRule, ResultList AcctChartAcctNumber, ResultList AcctChartDescr, ResultList AcctChartAlternateId, ResultList AcctCategory, ResultList IsParentAcct, ResultList ParentAcctChartAcctNumber, ResultList ParentAcctChartDescr, ResultList AcctChartType, ResultList EntityAltId1, ResultList EntityAltId2, ResultList EntityAltId3, ResultList EntityAltId4, ResultList EntityAltId5, ResultList CptyAltId1, ResultList CptyAltId2, ResultList CptyAltId3, ResultList CptyAltId4, ResultList CptyAltId5, ResultList FolderAltId1, ResultList FolderAltId2, ResultList FolderAltId3, ResultList FolderAltId4, ResultList FolderAltId5, ResultList TradeGroup, ResultList TradeAcctCode, ResultList TradeAcctCode2, ResultList CounterpartyTradeId, ResultList AlternateTradeId, ResultList TradeGroupAltId, ResultList TradeAcctCodeAltId, ResultList LinkGroup, ResultList LinkAcctCode, ResultList LinkAcctCode2, ResultList LinkGroupAltId, ResultList LinkAcctCodeAltId, ResultList AcctChartAltId1, ResultList AcctChartAltId2, ResultList AcctChartAltId3, ResultList AcctChartAltId4, ResultList AcctChartAltId5, ResultList ParentAcctChartAltId1, ResultList ParentAcctChartAltId2, ResultList ParentAcctChartAltId3, ResultList ParentAcctChartAltId4, ResultList ParentAcctChartAltId5, ResultList CashAccountAltID1, ResultList CashAccountAltID2, ResultList CashAccountAltID3, ResultList CashAccountAltID4, ResultList CashAccountAltID5, ResultList OriginalValueDate, ResultList ProductType, ResultList ProductSubType, ResultList AlternateLinkId, Container container) throws StreamTransformationException{
AbstractTrace trace = container.getTrace();
    int counter =0;
    int NoofRec = Fld1.length;
    int l1=0;int v1 =10 ;int c1=0;
    int count = (int)Math.ceil(NoofRec/10.0);
       for(int l2=0;l2<count;l2++)
    {
if(count>1)
{
if(l2 == (count-1)){
v1 =(NoofRec-(10*l2)) +l2  ;
}}
if(count ==1)
{v1=NoofRec ;}
   
String[][] temp = new String[v1][ Noofcols*v1];
    for(int i=1;i<v1;i++)
    {
        temp[0][0] =Fld1[0] ;  //AcctEntry0d
        temp[0][1] =Fld2[0] ;
        temp[0][2] =Fld3[0] ;
        temp[0][3] =Fld4[0] ;
        temp[0][4] =Fld5[0] ;
        temp[0][5] =Fld6[0] ;
        temp[0][6] =Fld7[0] ;
        temp[0][7] =Fld8[0] ;
        temp[0][8] =Fld9[0] ;
        temp[0][9] =Fld10[0] ;
    
        temp[0][10] =Fld11[0] ;
        temp[0][11] =Fld12[0] ;
        temp[0][12] =Fld13[0] ;
        temp[0][13] =Fld14[0] ;
        temp[0][14] =Fld15[0] ;
        temp[0][15] =Fld16[0] ;
        temp[0][16] =Fld17[0] ;
        temp[0][17] =Fld18[0] ;
        temp[0][18] =Fld19[0] ;
        temp[0][19] =Fld20[0] ;
    
        temp[0][20] =Fld21[0] ;
        temp[0][21] =Fld22[0] ;
        temp[0][22] =Fld23[0] ;
        temp[0][23] =Fld24[0] ;
        temp[0][24] =Fld25[0] ;
        temp[0][25] =Fld26[0] ;
        temp[0][26] =Fld27[0] ;
        temp[0][27] =Fld28[0] ;
        temp[0][28] =Fld29[0] ;
        temp[0][29] =Fld30[0] ;
    
        temp[0][30] =Fld31[0] ;
        temp[0][31] =Fld32[0] ;
        temp[0][32] =Fld33[0] ;
        temp[0][33] =Fld34[0] ;
        temp[0][34] =Fld35[0] ;
        temp[0][35] =Fld36[0] ;
        temp[0][36] =Fld37[0] ;
        temp[0][37] =Fld38[0] ;
        temp[0][38] =Fld39[0] ;
        temp[0][39] =Fld40[0] ;
    
        temp[0][40] =Fld41[0] ;
        temp[0][41] =Fld42[0] ;
        temp[0][42] =Fld43[0] ;
        temp[0][43] =Fld44[0] ;
        temp[0][44] =Fld45[0] ;
        temp[0][45] =Fld46[0] ;
        temp[0][46] =Fld47[0] ;
        temp[0][47] =Fld48[0] ;
        temp[0][48] =Fld49[0] ;
        temp[0][49] =Fld50[0] ;
    
        temp[0][50] =Fld51[0] ;
        temp[0][51] =Fld52[0] ;
        temp[0][52] =Fld53[0] ;
        temp[0][53] =Fld54[0] ;
        temp[0][54] =Fld55[0] ;
        temp[0][55] =Fld56[0] ;
        temp[0][56] =Fld57[0] ;
        temp[0][57] =Fld58[0] ;
        temp[0][58] =Fld59[0] ;
        temp[0][59] =Fld60[0] ;
    
        temp[0][60] =Fld61[0] ;
        temp[0][61] =Fld62[0] ;
        temp[0][62] =Fld63[0] ;
        temp[0][63] =Fld64[0] ;
        temp[0][64] =Fld65[0] ;
        temp[0][65] =Fld66[0] ;
        temp[0][66] =Fld67[0] ;
        temp[0][67] =Fld68[0] ;
        temp[0][68] =Fld69[0] ;
        temp[0][69] =Fld70[0] ;
    
        temp[0][70] =Fld71[0] ;
        temp[0][71] =Fld72[0] ;
        temp[0][72] =Fld73[0] ;
        temp[0][73] =Fld74[0] ;
      temp[i][counter++] =Fld1[i+l1] ;  //AcctEntryId
        temp[i][counter++] =Fld2[i+l1] ;
        temp[i][counter++] =Fld3[i+l1] ;
        temp[i][counter++] =Fld4[i+l1] ;
        temp[i][counter++] =Fld5[i+l1] ;
        temp[i][counter++] =Fld6[i+l1] ;
        temp[i][counter++] =Fld7[i+l1] ;
        temp[i][counter++] =Fld8[i+l1] ;
        temp[i][counter++] =Fld9[i+l1] ;
        temp[i][counter++] =Fld10[i+l1] ;
    
        temp[i][counter++] =Fld11[i+l1] ;
        temp[i][counter++] =Fld12[i+l1] ;
        temp[i][counter++] =Fld13[i+l1] ;
        temp[i][counter++] =Fld14[i+l1] ;
        temp[i][counter++] =Fld15[i+l1] ;
        temp[i][counter++] =Fld16[i+l1] ;
        temp[i][counter++] =Fld17[i+l1] ;
        temp[i][counter++] =Fld18[i+l1] ;
        temp[i][counter++] =Fld19[i+l1] ;
        temp[i][counter++] =Fld20[i+l1] ;
    
        temp[i][counter++] =Fld21[i+l1] ;
        temp[i][counter++] =Fld22[i+l1] ;
        temp[i][counter++] =Fld23[i+l1] ;
        temp[i][counter++] =Fld24[i+l1] ;
        temp[i][counter++] =Fld25[i+l1] ;
        temp[i][counter++] =Fld26[i+l1] ;
        temp[i][counter++] =Fld27[i+l1] ;
        temp[i][counter++] =Fld28[i+l1] ;
        temp[i][counter++] =Fld29[i+l1] ;
        temp[i][counter++] =Fld30[i+l1] ;
    
        temp[i][counter++] =Fld31[i+l1] ;
        temp[i][counter++] =Fld32[i+l1] ;
        temp[i][counter++] =Fld33[i+l1] ;
        temp[i][counter++] =Fld34[i+l1] ;
        temp[i][counter++] =Fld35[i+l1] ;
        temp[i][counter++] =Fld36[i+l1] ;
        temp[i][counter++] =Fld37[i+l1] ;
        temp[i][counter++] =Fld38[i+l1] ;
        temp[i][counter++] =Fld39[i+l1] ;
        temp[i][counter++] =Fld40[i+l1] ;
        temp[i][counter++] =Fld41[i+l1] ;
        temp[i][counter++] =Fld42[i+l1] ;
        temp[i][counter++] =Fld43[i+l1] ;
        temp[i][counter++] =Fld44[i+l1] ;
        temp[i][counter++] =Fld45[i+l1] ;
        temp[i][counter++] =Fld46[i+l1] ;
        temp[i][counter++] =Fld47[i+l1] ;
        temp[i][counter++] =Fld48[i+l1] ;
        temp[i][counter++] =Fld49[i+l1] ;
        temp[i][counter++] =Fld50[i+l1] ;
        temp[i][counter++] =Fld51[i+l1] ;
        temp[i][counter++] =Fld52[i+l1] ;
        temp[i][counter++] =Fld53[i+l1] ;
        temp[i][counter++] =Fld54[i+l1] ;
        temp[i][counter++] =Fld55[i+l1] ;
        temp[i][counter++] =Fld56[i+l1] ;
        temp[i][counter++] =Fld57[i+l1] ;
        temp[i][counter++] =Fld58[i+l1] ;
        temp[i][counter++] =Fld59[i+l1] ;
        temp[i][counter++] =Fld60[i+l1] ;
    
        temp[i][counter++] =Fld61[i+l1] ;
        temp[i][counter++] =Fld62[i+l1] ;
        temp[i][counter++] =Fld63[i+l1] ;
        temp[i][counter++] =Fld64[i+l1] ;
        temp[i][counter++] =Fld65[i+l1] ;
        temp[i][counter++] =Fld66[i+l1] ;
        temp[i][counter++] =Fld67[i+l1] ;
        temp[i][counter++] =Fld68[i+l1] ;
        temp[i][counter++] =Fld69[i+l1] ;
        temp[i][counter++] =Fld70[i+l1] ;
        temp[i][counter++] =Fld71[i+l1] ;
        temp[i][counter++] =Fld72[i+l1] ;
        temp[i][counter++] =Fld73[i+l1] ;
        temp[i][counter++] =Fld74[i+l1] ;
        counter =0;
                c1 =i ;
        }
        l1 = l1+c1 ;
        for (int j=0,k = 0; k < Noofcols; k++)
        {
            if (temp[j][k].equalsIgnoreCase("AcctEntryId") ||
                    temp[j][k].equalsIgnoreCase("ValueDate")     ||        
                    temp[j][k].equalsIgnoreCase("Entity") ||
                    temp[j][k].equalsIgnoreCase("Folder") ||
                    temp[j][k].equalsIgnoreCase("DenomCcy") ||
                    temp[j][k].equalsIgnoreCase("FunctCcy") ||
                    temp[j][k].equalsIgnoreCase("TradeId") ||
                    temp[j][k].equalsIgnoreCase("TradeVersion") ||
                    temp[j][k].equalsIgnoreCase("TradeType") ||
                    temp[j][k].equalsIgnoreCase("LinkId") ||
                    temp[j][k].equalsIgnoreCase("LinkVersion") ||
                    temp[j][k].equalsIgnoreCase("Counterparty") ||
                    temp[j][k].equalsIgnoreCase("AcctProcess") ||
                    temp[j][k].equalsIgnoreCase("CashAccount") ||
                    temp[j][k].equalsIgnoreCase("AcctEntryDescr") ||
                    temp[j][k].equalsIgnoreCase("ReversesAcctEntryId") ||
                    temp[j][k].equalsIgnoreCase("AcctEntrySubSysId") ||
                    temp[j][k].equalsIgnoreCase("DenomCcyAmount") ||
                    temp[j][k].equalsIgnoreCase("FunctCcyAmount")  ||
                    temp[j][k].equalsIgnoreCase("AcctRule") ||
                    temp[j][k].equalsIgnoreCase("AcctChartAcctNumber") ||
                    temp[j][k].equalsIgnoreCase("AcctChartDescr") ||
                    temp[j][k].equalsIgnoreCase("AcctChartAlternateId") ||
                    temp[j][k].equalsIgnoreCase("AcctCategory") ||
                    temp[j][k].equalsIgnoreCase("IsParentAcct") ||
                    temp[j][k].equalsIgnoreCase("ParentAcctChartAcctNumber") ||
                    temp[j][k].equalsIgnoreCase("ParentAcctChartDescr") ||
                    temp[j][k].equalsIgnoreCase("AcctChartType") ||
                    temp[j][k].equalsIgnoreCase("EntityAltId1") ||
                    temp[j][k].equalsIgnoreCase("EntityAltId2") ||
                    temp[j][k].equalsIgnoreCase("EntityAltId3") ||
                    temp[j][k].equalsIgnoreCase("EntityAltId4") ||
                    temp[j][k].equalsIgnoreCase("EntityAltId5") ||
                    temp[j][k].equalsIgnoreCase("CptyAltId1") ||
                    temp[j][k].equalsIgnoreCase("CptyAltId2") ||
                    temp[j][k].equalsIgnoreCase("CptyAltId3") ||
                    temp[j][k].equalsIgnoreCase("CptyAltId4") ||
                    temp[j][k].equalsIgnoreCase("CptyAltId5") ||
                    temp[j][k].equalsIgnoreCase("FolderAltId1") ||
                    temp[j][k].equalsIgnoreCase("FolderAltId2") ||
                    temp[j][k].equalsIgnoreCase("FolderAltId3") ||
                    temp[j][k].equalsIgnoreCase("FolderAltId4") ||
                    temp[j][k].equalsIgnoreCase("FolderAltId5") ||
                    temp[j][k].equalsIgnoreCase("TradeGroup") ||
                    temp[j][k].equalsIgnoreCase("TradeAcctCode") ||
                    temp[j][k].equalsIgnoreCase("TradeAcctCode2") ||
                    temp[j][k].equalsIgnoreCase("CounterpartyTradeId") ||
                    temp[j][k].equalsIgnoreCase("AlternateTradeId") ||
                    temp[j][k].equalsIgnoreCase("TradeGroupAltId") ||
                    temp[j][k].equalsIgnoreCase("TradeAcctCodeAltId") ||
                    temp[j][k].equalsIgnoreCase("LinkGroup") ||
                    temp[j][k].equalsIgnoreCase("LinkAcctCode") ||
                    temp[j][k].equalsIgnoreCase("LinkAcctCode2") ||
                    temp[j][k].equalsIgnoreCase("LinkGroupAltId") ||
                    temp[j][k].equalsIgnoreCase("LinkAcctCodeAltId") ||
                    temp[j][k].equalsIgnoreCase("AcctChartAltId1") ||
                    temp[j][k].equalsIgnoreCase("AcctChartAltId2") ||
                    temp[j][k].equalsIgnoreCase("AcctChartAltId3") ||
                    temp[j][k].equalsIgnoreCase("AcctChartAltId4") ||
                    temp[j][k].equalsIgnoreCase("AcctChartAltId5") ||
                    temp[j][k].equalsIgnoreCase("ParentAcctChartAltId1") ||
                    temp[j][k].equalsIgnoreCase("ParentAcctChartAltId2") ||
                    temp[j][k].equalsIgnoreCase("ParentAcctChartAltId3") ||
                    temp[j][k].equalsIgnoreCase("ParentAcctChartAltId4") ||
                    temp[j][k].equalsIgnoreCase("ParentAcctChartAltId5") ||
                    temp[j][k].equalsIgnoreCase("CashAccountAltID1") ||
                    temp[j][k].equalsIgnoreCase("CashAccountAltID2") ||
                    temp[j][k].equalsIgnoreCase("CashAccountAltID3") ||
                    temp[j][k].equalsIgnoreCase("CashAccountAltID4") ||
                    temp[j][k].equalsIgnoreCase("CashAccountAltID5") ||
                    temp[j][k].equalsIgnoreCase("OriginalValueDate") ||
                    temp[j][k].equalsIgnoreCase("ProductType") ||
                    temp[j][k].equalsIgnoreCase("ProductSubType") ||
                    temp[j][k].equalsIgnoreCase("AlternateLinkId"))
            
            {
                 if(temp[j][k].equalsIgnoreCase("AcctEntryId")) {for(int m1 = 1; m1 < v1; m1++){AcctEntryId.addValue(temp[m1][k]);}}
             else if(temp[j][k].equalsIgnoreCase("ValueDate"))   {for(int m2 = 1; m2 < v1; m2++){ValueDate.addValue(temp[m2][k]);}}
             else if(temp[j][k].equalsIgnoreCase("Entity"))      {for(int m3 = 1; m3 < v1; m3++){Entity.addValue(temp[m3][k]);}}
             else if(temp[j][k].equalsIgnoreCase("Folder"))      {for(int m4 = 1; m4 < v1; m4++){Folder.addValue(temp[m4][k]);}}
             else if(temp[j][k].equalsIgnoreCase("DenomCcy"))    {for(int m5 = 1; m5 < v1; m5++){DenomCcy.addValue(temp[m5][k]);}}         
             else if(temp[j][k].equalsIgnoreCase("FunctCcy"))    {for(int m6 = 1; m6 < v1; m6++){FunctCcy.addValue(temp[m6][k]);}}
             else if(temp[j][k].equalsIgnoreCase("TradeId"))     {for(int m7 = 1; m7 < v1; m7++){TradeId.addValue(temp[m7][k]);}}
             else if(temp[j][k].equalsIgnoreCase("TradeVersion")){for(int m8 = 1; m8 < v1; m8++){TradeVersion.addValue(temp[m8][k]);}}
             else if(temp[j][k].equalsIgnoreCase("TradeType"))   {for(int m9 = 1; m9 < v1; m9++){TradeType.addValue(temp[m9][k]);}}
             else if(temp[j][k].equalsIgnoreCase("LinkId"))      {for(int m10 = 1; m10 < v1; m10++){LinkId.addValue(temp[m10][k]);}}
              
             else if(temp[j][k].equalsIgnoreCase("LinkVersion"))          {for(int m11 = 1; m11 < v1; m11++){LinkVersion.addValue(temp[m11][k]);}}
             else if(temp[j][k].equalsIgnoreCase("Counterparty"))         {for(int m12 = 1; m12 < v1; m12++){Counterparty.addValue(temp[m12][k]);}}
             else if(temp[j][k].equalsIgnoreCase("AcctProcess"))         {for(int m13 = 1; m13 < v1; m13++){AcctProcess.addValue(temp[m13][k]);}}
             else if(temp[j][k].equalsIgnoreCase("CashAccount"))        {for(int m14 = 1; m14 < v1; m14++){CashAccount.addValue(temp[m14][k]);}}
             else if(temp[j][k].equalsIgnoreCase("AcctEntryDescr"))        {for(int m15 = 1; m15 < v1; m15++){AcctEntryDescr.addValue(temp[m15][k]);}}         
             else if(temp[j][k].equalsIgnoreCase("ReversesAcctEntryId")){for(int m16 = 1; m16 < v1; m16++){ReversesAcctEntryId.addValue(temp[m16][k]);}}
             else if(temp[j][k].equalsIgnoreCase("AcctEntrySubSysId"))    {for(int m17 = 1; m17 < v1; m17++){AcctEntrySubSysId.addValue(temp[m17][k]);}}
             else if(temp[j][k].equalsIgnoreCase("DenomCcyAmount"))        {for(int m18 = 1; m18 < v1; m18++){DenomCcyAmount.addValue(temp[m18][k]);}}
             else if(temp[j][k].equalsIgnoreCase("FunctCcyAmount"))        {for(int m19 = 1; m19 < v1; m19++){FunctCcyAmount.addValue(temp[m19][k]);}}
             else if(temp[j][k].equalsIgnoreCase("AcctRule"))            {for(int m20 = 1; m20 < v1; m20++){AcctRule.addValue(temp[m20][k]);}}
         
             else if(temp[j][k].equalsIgnoreCase("AcctChartAcctNumber"))    {for(int m21 = 1; m21 < v1; m21++){AcctChartAcctNumber.addValue(temp[m21][k]);}}
             else if(temp[j][k].equalsIgnoreCase("AcctChartDescr"))            {for(int m22 = 1; m22 < v1; m22++){AcctChartDescr.addValue(temp[m22][k]);}}
             else if(temp[j][k].equalsIgnoreCase("AcctChartAlternateId"))    {for(int m23 = 1; m23 < v1; m23++){AcctChartAlternateId.addValue(temp[m23][k]);}}
             else if(temp[j][k].equalsIgnoreCase("AcctCategory"))            {for(int m24 = 1; m24 < v1; m24++){AcctCategory.addValue(temp[m24][k]);}}
             else if(temp[j][k].equalsIgnoreCase("IsParentAcct"))            {for(int m25 = 1; m25 < v1; m25++){IsParentAcct.addValue(temp[m25][k]);}}         
             else if(temp[j][k].equalsIgnoreCase("ParentAcctChartAcctNumber")){for(int m26 = 1; m26 < v1; m26++){ParentAcctChartAcctNumber.addValue(temp[m26][k]);}}
             else if(temp[j][k].equalsIgnoreCase("ParentAcctChartDescr"))    {for(int m27 = 1; m27 < v1; m27++){ParentAcctChartDescr.addValue(temp[m27][k]);}}
             else if(temp[j][k].equalsIgnoreCase("AcctChartType"))            {for(int m28 = 1; m28 < v1; m28++){AcctChartType.addValue(temp[m28][k]);}}
             else if(temp[j][k].equalsIgnoreCase("EntityAltId1"))            {for(int m29 = 1; m29 < v1; m29++){EntityAltId1.addValue(temp[m29][k]);}}
             else if(temp[j][k].equalsIgnoreCase("EntityAltId2"))            {for(int m30 = 1; m30 < v1; m30++){EntityAltId2.addValue(temp[m30][k]);}}
              
             else if(temp[j][k].equalsIgnoreCase("EntityAltId3"))            {for(int m31 = 1; m31 < v1; m31++){EntityAltId3.addValue(temp[m31][k]);}}
             else if(temp[j][k].equalsIgnoreCase("EntityAltId4"))            {for(int m32 = 1; m32 < v1; m32++){EntityAltId4.addValue(temp[m32][k]);}}
             else if(temp[j][k].equalsIgnoreCase("EntityAltId5"))            {for(int m33 = 1; m33 < v1; m33++){EntityAltId5.addValue(temp[m33][k]);}}
             else if(temp[j][k].equalsIgnoreCase("CptyAltId1"))                {for(int m34 = 1; m34 < v1; m34++){CptyAltId1.addValue(temp[m34][k]);}}
             else if(temp[j][k].equalsIgnoreCase("CptyAltId2"))                {for(int m35 = 1; m35 < v1; m35++){CptyAltId2.addValue(temp[m35][k]);}}         
             else if(temp[j][k].equalsIgnoreCase("CptyAltId3"))                {for(int m36 = 1; m36 < v1; m36++){CptyAltId3.addValue(temp[m36][k]);}}
             else if(temp[j][k].equalsIgnoreCase("CptyAltId4"))                {for(int m37 = 1; m37 < v1; m37++){CptyAltId4.addValue(temp[m37][k]);}}
             else if(temp[j][k].equalsIgnoreCase("CptyAltId5"))                {for(int m38 = 1; m38 < v1; m38++){CptyAltId5.addValue(temp[m38][k]);}}
             else if(temp[j][k].equalsIgnoreCase("FolderAltId1"))            {for(int m39 = 1; m39 < v1; m39++){FolderAltId1.addValue(temp[m39][k]);}}
             else if(temp[j][k].equalsIgnoreCase("FolderAltId2"))            {for(int m40 = 1; m40 < v1; m40++){FolderAltId2.addValue(temp[m40][k]);}}
           
              
             else if(temp[j][k].equalsIgnoreCase("FolderAltId3"))            {for(int m41 = 1; m41 < v1; m41++){FolderAltId3.addValue(temp[m41][k]);}}
             else if(temp[j][k].equalsIgnoreCase("FolderAltId4"))            {for(int m42 = 1; m42 < v1; m42++){FolderAltId4.addValue(temp[m42][k]);}}
             else if(temp[j][k].equalsIgnoreCase("FolderAltId5"))            {for(int m43 = 1; m43 < v1; m43++){FolderAltId5.addValue(temp[m43][k]);}}
             else if(temp[j][k].equalsIgnoreCase("TradeGroup"))                {for(int m44 = 1; m44 < v1; m44++){TradeGroup.addValue(temp[m44][k]);}}
             else if(temp[j][k].equalsIgnoreCase("TradeAcctCode"))            {for(int m45 = 1; m45 < v1; m45++){TradeAcctCode.addValue(temp[m45][k]);}}         
             else if(temp[j][k].equalsIgnoreCase("TradeAcctCode2"))            {for(int m46 = 1; m46 < v1; m46++){TradeAcctCode2.addValue(temp[m46][k]);}}
             else if(temp[j][k].equalsIgnoreCase("CounterpartyTradeId"))    {for(int m47 = 1; m47 < v1; m47++){CounterpartyTradeId.addValue(temp[m47][k]);}}
             else if(temp[j][k].equalsIgnoreCase("AlternateTradeId"))        {for(int m48 = 1; m48 < v1; m48++){AlternateTradeId.addValue(temp[m48][k]);}}
             else if(temp[j][k].equalsIgnoreCase("TradeGroupAltId"))        {for(int m49 = 1; m49 < v1; m49++){TradeGroupAltId.addValue(temp[m49][k]);}}
             else if(temp[j][k].equalsIgnoreCase("TradeAcctCodeAltId"))        {for(int m50 = 1; m50 < v1; m50++){TradeAcctCodeAltId.addValue(temp[m50][k]);}}
              
             else if(temp[j][k].equalsIgnoreCase("LinkGroup"))            {for(int m51 = 1; m51 < v1; m51++){LinkGroup.addValue(temp[m51][k]);}}
             else if(temp[j][k].equalsIgnoreCase("LinkAcctCode"))        {for(int m52 = 1; m52 < v1; m52++){LinkAcctCode.addValue(temp[m52][k]);}}
             else if(temp[j][k].equalsIgnoreCase("LinkAcctCode2"))        {for(int m53 = 1; m53 < v1; m53++){LinkAcctCode2.addValue(temp[m53][k]);}}
             else if(temp[j][k].equalsIgnoreCase("LinkGroupAltId"))        {for(int m54 = 1; m54 < v1; m54++){LinkGroupAltId.addValue(temp[m54][k]);}}
             else if(temp[j][k].equalsIgnoreCase("LinkAcctCodeAltId"))    {for(int m55 = 1; m55 < v1; m55++){LinkAcctCodeAltId.addValue(temp[m55][k]);}}         
             else if(temp[j][k].equalsIgnoreCase("AcctChartAltId1"))    {for(int m56 = 1; m56 < v1; m56++){AcctChartAltId1.addValue(temp[m56][k]);}}
             else if(temp[j][k].equalsIgnoreCase("AcctChartAltId2"))    {for(int m57 = 1; m57 < v1; m57++){AcctChartAltId2.addValue(temp[m57][k]);}}
             else if(temp[j][k].equalsIgnoreCase("AcctChartAltId3"))    {for(int m58 = 1; m58 < v1; m58++){AcctChartAltId3.addValue(temp[m58][k]);}}
             else if(temp[j][k].equalsIgnoreCase("AcctChartAltId4"))    {for(int m59 = 1; m59 < v1; m59++){AcctChartAltId4.addValue(temp[m59][k]);}}
             else if(temp[j][k].equalsIgnoreCase("AcctChartAltId5"))    {for(int m60 = 1; m60 < v1; m60++){AcctChartAltId5.addValue(temp[m60][k]);}}
              
              
             else if(temp[j][k].equalsIgnoreCase("ParentAcctChartAltId1"))    {for(int m61 = 1; m61 < v1; m61++){ParentAcctChartAltId1.addValue(temp[m61][k]);}}
             else if(temp[j][k].equalsIgnoreCase("ParentAcctChartAltId2"))    {for(int m62 = 1; m62 < v1; m62++){ParentAcctChartAltId2.addValue(temp[m62][k]);}}
             else if(temp[j][k].equalsIgnoreCase("ParentAcctChartAltId3"))    {for(int m63 = 1; m63 < v1; m63++){ParentAcctChartAltId3.addValue(temp[m63][k]);}}
             else if(temp[j][k].equalsIgnoreCase("ParentAcctChartAltId4"))    {for(int m64 = 1; m64 < v1; m64++){ParentAcctChartAltId4.addValue(temp[m64][k]);}}
             else if(temp[j][k].equalsIgnoreCase("ParentAcctChartAltId5"))    {for(int m65 = 1; m65 < v1; m65++){ParentAcctChartAltId5.addValue(temp[m65][k]);}}         
             else if(temp[j][k].equalsIgnoreCase("CashAccountAltID1"))        {for(int m66 = 1; m66 < v1; m66++){CashAccountAltID1.addValue(temp[m66][k]);}}
             else if(temp[j][k].equalsIgnoreCase("CashAccountAltID2"))        {for(int m67 = 1; m67 < v1; m67++){CashAccountAltID2.addValue(temp[m67][k]);}}
             else if(temp[j][k].equalsIgnoreCase("CashAccountAltID3"))        {for(int m68 = 1; m68 < v1; m68++){CashAccountAltID3.addValue(temp[m68][k]);}}
             else if(temp[j][k].equalsIgnoreCase("CashAccountAltID4"))        {for(int m69 = 1; m69 < v1; m69++){CashAccountAltID4.addValue(temp[m69][k]);}}
             else if(temp[j][k].equalsIgnoreCase("CashAccountAltID5"))        {for(int m70 = 1; m70 < v1; m70++){CashAccountAltID5.addValue(temp[m70][k]);}}
         
             else if(temp[j][k].equalsIgnoreCase("OriginalValueDate"))    {for(int m71 = 1; m71 < v1; m71++){OriginalValueDate.addValue(temp[m71][k]);}}
             else if(temp[j][k].equalsIgnoreCase("ProductType"))        {for(int m72 = 1; m72 < v1; m72++){ProductType.addValue(temp[m72][k]);}}
             else if(temp[j][k].equalsIgnoreCase("ProductSubType"))        {for(int m73 = 1; m73 < v1; m73++){ProductSubType.addValue(temp[m73][k]);}}  
          
               
              
              else
              {
                for(int m74 = 1; m74 < v1; m74++)
                {
                    AlternateLinkId.addValue(temp[m74][k]);
                }
              }
      
            }
            else
            {
            throw new StreamTransformationException( " Column name " + temp[j][k] + " in the file is not matching with our column     names");
            }
        }// for loop
}//close brace for top forloop


We have tested the interface with different file sizes ranging from 15mb to 30 mb.We got the expected output as result for all cases.

Regards

Venkat

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply