Page 1 of 1

Read "|" delimited data from a java code.

Posted: Mon Mar 12, 2012 1:47 am
by chetan.c
Hi All,

I have a java transformer stage which is giving output as below.

Code: Select all

col1|col2|col3...
data1|data2|data3|
.
.
I want to recieve this data and use this for a join.
Currently the java code is giving the output as a string.
Do I need to split data there into different columns or split string later with a different stage?
If i have to split data into columns what is the stage that I must be using?

Thanks,
Chetan.C

Posted: Mon Mar 12, 2012 1:55 am
by chetan.c
Currently trying out column inport stage.
But want know how recieve the data as seperate columns from the Code.

Thanks.

Posted: Mon Mar 12, 2012 2:29 am
by kandyshandy
You can change your JAVA code to return multiple columns as output. I have seen this in at least 1 project.

Posted: Mon Mar 12, 2012 2:56 am
by chetan.c
So column export is not a good option?

Thanks,
Chetan.C

Posted: Mon Mar 12, 2012 3:04 am
by kandyshandy
chetan.c wrote:But want know how recieve the data as seperate columns from the Code.
I answered your question but did not say that it is the best method. Anyways, column export can't be used for your case. It's column import to split one field into multiple. You can also use transfomer stage but you need to decide based on requirements & downstream transformations.

Posted: Mon Mar 12, 2012 3:44 am
by chetan.c
Yes right.
I am using column import itself, it was typo.

Now splitting into columns at code itself.

Posted: Mon Mar 12, 2012 6:21 am
by eostic
Definitely change the java class if you can...it can easily send it's output in multiple rows and individual columns.....

Ernie