Create one file for each database result. Suggestions

Five Stars

Create one file for each database result. Suggestions

Hi,


What I have to do:
Get all records from my database table "CFE".
Create a file for each of the results of my table.
The name of each file will be different, it is composed of two variables that are obtained from the row of the query.
The file is an XML, so I need a tMap component to organize the data output.

In this example, it is not included, but you may need to have different XML structures, just add another tMap output.

I created an example without the connection to the database, so you can try it. Attached.

I would like to know if there is any way to make it easier or if I am commenting on a design error.

 

MySQLToIterateFileCustomName.png

 

Community Manager

Re: Create one file for each database result. Suggestions

Hi 

I just have a small question about your data, are TipoCFE+CFEId unique key in each record? Does it exist several records with the same ipoCFE+CFEId? if yes, the generated file will be overwritten by the new record.

 

Regards

Shong

----------------------------------------------------------
Talend | Data Agility for Modern Business

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 2

Part 2 of a series on Context Variables

Blog

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