Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a file having 7 columns, then 7th column can be further splitted into several records on the basis of delimiter( ; ), In Ab Initio, I separate this 7th column in vector, but don't know how to do this in talend, can someone suggest on this.
e.g. the file has a record like a,b,c,d,r,f,g[100], like g[1] is like x,y,z,i,j,k and so on.. Number of 7th column records are not fixed.
Thanks in advance.
@mani1304 wrote:
Thanks buddy, I did this in tjavaflex but how to do this in tMap, what would be the datatype for this, but I was looking something similar to vectors, but seems here this is missing.
You can use the List data type. To build a list from the String array you could do this:
output_row.gList = java.util.Arrays.asList(input_row.g.split(","));
Just use the split method native to Java strings:
String[] data = input_row.g.split(",");
You can use it in a tMap, a tJava* component or anywhere an expression is allowed.
Thanks buddy, I did this in tjavaflex but how to do this in tMap, what would be the datatype for this, but I was looking something similar to vectors, but seems here this is missing.
@mani1304 wrote:
Thanks buddy, I did this in tjavaflex but how to do this in tMap, what would be the datatype for this, but I was looking something similar to vectors, but seems here this is missing.
You can use the List data type. To build a list from the String array you could do this:
output_row.gList = java.util.Arrays.asList(input_row.g.split(","));
Thanks, it works