Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
mani1304
Creator
Creator

Vector data load

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.

Labels (1)
1 Solution

Accepted Solutions
nfz11
Creator III
Creator III


@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(","));

 

View solution in original post

4 Replies
nfz11
Creator III
Creator III

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.

mani1304
Creator
Creator
Author

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.

 

nfz11
Creator III
Creator III


@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(","));

 

mani1304
Creator
Creator
Author

Thanks, it works