Generating multiple excel files based on tFlowToiterate global variable

Six Stars

Generating multiple excel files based on tFlowToiterate global variable

Hi,

 

scenario i am doing:

 

1. I am querying Entity object and putting out put into excel file.

2. I have to go through each and every row in that file with the help of one column called ObjectAPIName. here i i am declaring a tFlowtoiterate to iterate the file and to store ObectAPIName.

3 Each time i query one record and i will get ObectAPIName from file and then I am querying Field definition obect with the help of ObjectAPIName. and then writing it to output file.

 

so my requirement is

I need to generate different output files for each row which is there in excel 1.

and in file name wht i have to pass

how i can achieve this. ?

Two Stars

Re: Generating multiple excel files based on tFlowToiterate global variable

Hello,

 

You have to use the value of the iteration : row2.<columnname>.

 

Regards.

Highlighted
Six Stars

Re: Generating multiple excel files based on tFlowToiterate global variable

Lavankumar ,

 

FileName that you have given is correct , based on your explanation you will get one unique ObectAPIName for every row so , you can use that particular column globalvariable  as filename suffix something like "c:/talend/sample"+(string)globalMap.get(row1.ObectAPIName)+".xls" and finally you will get different files for every record like sampleX.xls , sampleY.xls and so on.

 

Thanks.

Fifteen Stars TRF
Fifteen Stars

Re: Generating multiple excel files based on tFlowToiterate global variable

Fifteen Stars TRF
Fifteen Stars

Re: Generating multiple excel files based on tFlowToiterate global variable

@Lavankumar, did this help?

If so, thank's to mark your case as solved (Kudos also acceptedas a bonus).


TRF

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog