Unanswered posts

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » appending multiple rows from a file into one row

#1 2008-07-04 12:54:41

toshkil
Guest

appending multiple rows from a file into one row

Tags: [append]

how is it possible to append multiple rows from a file into one row, that can be outputted to a file/db as one row ( which is a concatenation of all the other rows)?

#2 2008-07-04 13:02:42

jamesB
Member
Registered: 2008-03-19
Posts: 47

Re: appending multiple rows from a file into one row

Hi

example :

a;b;c;d;g;
a;b;c;d;o;c;
a;b;c;d;g;
a;b;c;d;e;f;

in the outputfile y define just one record, and in the inputFile y define like field separator "|" and not the ";"
like row separator "\n"
result :

a;b;c;d;g;a;b;c;d;o;c;a;b;c;d;g;a;b;c;d;e;f;

Regards,
JamesB


Whatever you are, be a good one..

Offline

#3 2008-07-04 13:49:09

toshkil
Guest

Re: appending multiple rows from a file into one row

sorry i left a bit out above, the file is an advanced xml file and i want to append all rows into one row, but seperated with a ";"

so the input file looks like this:

a
b
c
d
e


i want the xml file element to have this:

<myelement>a;b;c;d;e;</management>

does that make sense?

#4 2008-07-04 14:42:27

toshkil
Guest

Re: appending multiple rows from a file into one row

it looks like i cant do it without doing roundabout stuff, with the example you gave above james, the problem with the example above is it looks like this on output:

;a;b;c;d;e;f;
instead of
a;b;c;d;e;f

#5 2008-07-09 18:31:54

youssef
Member
Registered: 2008-07-09
Posts: 87

Re: appending multiple rows from a file into one row

toshkil wrote:

it looks like i cant do it without doing roundabout stuff, with the example you gave above james, the problem with the example above is it looks like this on output:

;a;b;c;d;e;f;
instead of
a;b;c;d;e;f

Hi toshkil,
Here is the job that gets your file and returns the result you want. you just need to load the output data of this job into an xml file. I hope this help

Regards,
Youssef


Uploaded Images

Last edited by youssef (2008-07-09 18:37:40)

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » appending multiple rows from a file into one row

Board footer

Powered by FluxBB