Iterate over a "List of value" context variable

Six Stars

Iterate over a "List of value" context variable

Hi,

 

For the momentI use a tForeach to loop over a list of e-mails that I write directly into the component settings : 

 

foreachloop.PNG

 

Instead of doing that, I would rather store them into an array-like context variable. I've seen this "List of value" type so this is what I've done :

 

mails_context.PNG

 

But I can't find a way to iterate over the values of this context variable.

 

Thanks for the help.


Accepted Solutions
Community Manager

Re: Iterate over a "List of value" context variable

Hi
You can store the value in a context variable with string type, like:
email1,email2, email3
In the job, use a tNormalize component to normalize the value to multiple rows, and then iterate each row, eg:
tFixedFlowInput--main--tNormalize--tFlowToIterate--iterate--tPop

Regards
Shong

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

All Replies
Community Manager

Re: Iterate over a "List of value" context variable

Hi
You can store the value in a context variable with string type, like:
email1,email2, email3
In the job, use a tNormalize component to normalize the value to multiple rows, and then iterate each row, eg:
tFixedFlowInput--main--tNormalize--tFlowToIterate--iterate--tPop

Regards
Shong

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

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.