Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a requirement like below
col1;col2;col3
1;a;2
2;b;3
3;c;1
the records should be generated based on the col3 , if like col3 have 2 then the records should be 2 my output should like below
col1;col2;col3
1;a;1
1;a;2
2;b;1
2;b;2
2;b;3
3;c;1
any suggestions would be really appreciated
thanks,
lmit
Hello,
You could use tLoop to output the same line several times base on the 'col3' field. The job looks like:
Input--tFlowToIterate--iterate-->tLoop--iterate-->tFixedFlowInput--main--tLogRow
on tLoop, set the To parameter as: (Integer)globalMap.get("row1.col3")
Please have a look at my screenshots for details.
Best regards
Sabrina
Hi @Xiaodi Shi ,
thanks for the suggestion and it worked but when am storing the data in file only the last record is getting saved
can you suggest what I can do ? Should I use the append option in the excel output
thanks,
lmit
Hi All,
any suggestions would really appreciate
thanks in advance,
lmit
Hello,
Please check out "Append" option in the excel output component.
Note: Due to "Append" is written to cache, so if your inserted data is very huge, the job could get out Of memory exception.
Best regards
Sabrina
Thanks @Xiaodi Shi
yes append is giving out of memory error as I have huge data
any other alternative??
thanks,
lmit
Hello,
Is it getting loaded successfully when you try to append with less data using tfileoutputexcel component?
What the total number of records are you trying to load?
Best regards
Sabrina
I have more than 1 lakh of records
no for less data (10 records)also am not getting @Xiaodi Shi
thanks,
lmit
Hello
Could you please try to allocate more memory to the job execution to see if it helps?
Here is a KB article about: OutOfMemory Exception
Best regards
Sabrina