I'm working with a database and one column has three values 'A - 00000', 'F - 00000' and 'NC - 00000', I need separate each value to the others, it´s possible separate with tFilterRow or need other element to do it?.
Hi @AngelTrejo1208 ,
This is possible in both static and dynamic way.
If you have definite number of distinct value you can create those many flows from tMap and separate the flows using expression filters.
If number of distinct value is not known, please follow the below steps:
1. get the distinct value from the database as "select distinct colname from tabname"
2. connect tFlowToIterate to the DB output.
3. In tFlowToIterate -> iterate output -> connect the same DB again with full query like "select * from tabname where colname = '"+((String)globalMap.get("yourtFlowToIterateKey"))+"'"
4. This Output can be put into a file and each file name can have the suffix of your tFlowToIterateKey as <FileName>_"+((String)globalMap.get("yourtFlowToIterateKey"))+".txt
This way you can dynamically split into as many files as there are number of distinct value for your column.
Thanks and Regards,
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Find out how to migrate from one database to another using the Dynamic schema
Read about some useful Context Variable ideas
Pick up some tips and tricks with Context Variables