Six Stars

How to use array in a context

Hello,

 

I would like to use an array in a context but how i can create this ?

 - In a string like "Nike", "Adidas", "Rip Curl" ?

 

Finaly, it's to test if my current value is in my array but all i test not work

 

Do you have an idea ?

Thanks

6 REPLIES
Nine Stars

Re: How to use array in a context

(new String[] {"adidas","morty","jump", "up","down","picklerick"})

Five Stars

Re: How to use array in a context

I think list of values in context type can be used for that purpose

Four Stars

Re: How to use array in a context

HELLO,
I am using tStatCatcher for capturing the log in a flat file.
and its good!

Tutuapp TextNow  Photomath

One Star

Re: How to use array in a context

Hello developers, I need some guidance on using the multidimensional array?

Nine Stars

Re: How to use array in a context

Single dimension:

(new String[] {"adidas","morty","jump", "up","down","picklerick"})

Multi:

( new String[] { new String[] { "jabadabadoo", "wilmaaaaa" } , new String[] { "rick", "sanchez" } , "morty","jump", "up","down","picklerick"} )

 

Please elaborate on what you're planning to do... and why multi dimension?

 

Community Manager

Re: How to use array in a context

Hi arnaudbroens
Define the variable with string type, and use tNormalize to normalize the value to multiple rows, do an inner join between input data and the predefined values. eg:
tMysqlInput--main--tMap--->tLogrow
                                 |
                            lookup--tFixedFlowInput--tNormalize
on tFixedFlowInput: output the value of context variable

Regards
Shong

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