Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a field with data type String Array and I am looking for some way to handle this in my Job.
I don't see data type as "String Array" in any of the components.
Is there a way to handle String Array in Talend?
Thanks,
Sanjay
No such component.
You can do it yourself, this is how I declare it in a tContext global variable which is an Object.
(new String[] {"something","something"})
If you want to make something flexible you probably end up using tJava, tJavaRow, tJavaFlex.
Thanks Dijke,
I did not get how to process the String Array, Would you mind providing me few screen shots.
Regards,
Sanjay
An example... not how I exactly use it, just to give you an idea how to.
The purpose for what I used an array was to reduce parameters and store it all together in one variable, it was more an experiment not very practical and useful...
But I figured out how I could use arrays
Thanks for your detailed explanation and useful trick to handle String Array, Unfortunately my requirement is little different.
I have a couchbase database which stores the data in the form of String Array and I am supposed to read it and process in Talend job.
After processing i am supposed to load the String Array back to Couchbase.
The issue is that i don't have any Data Type for String Array in Talend.
So not able to process String Array.
Looks like treating String Array as Object would work for me.
Thanks for your Ideas