cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in File Content Conversion

Former Member
0 Kudos

hi all,

I am getting one Flat file which I need to convert in xml before processing it in mapping. Below is the structure of the input file:-

dkghdgk

gkhdggg

ghdgkhdgk

46ffsfsf

:lgjdgdgg

$dfgxvnlkas

vnmvkvas;vasofjsfasfv

vbvgfpwtndfgdjgdgdfv

vnmvlddg jgkl jklk j l;

jhkg; gj klhjg njkdgggpr83jg

nhldggdgdggfgjhgfj

Number of rows in the file is not constant.

My requirment is to convert in such a way that first 3 rows should be assigned to first three fields and forth field should contain rest all data or in other manner. But first 3 rows must be in three seperate fields, rest all rows can be defined in any way.

Please let me know if it is possible in File content conversion. If not please tell the alternate way.

Thanks

Jai

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jaideep,

But first 3 rows must be in three separate fields, rest all rows can be defined in any way.
Please let me know if it is possible in File content conversion. If not please tell the alternate way.

Is it fine if you read the flat file line by line and a temporary structure is created which will

have a field say Row under a node DATA,

row will repeat as number of times as there are lines in the input file.

later you can keep first three line as different fields and merge the remaining in a single field.

You may have to create two mappings to map it to the actual structure required .

Please refer this blog(see the screenshots in the blog)

/people/sravya.talanki2/blog/2005/08/16/configuring-generic-sender-file-cc-adapter

My requirment is to convert in such a way that first 3 rows should be 
assigned to first three fields and forth field should contain rest all data or in
 other manner. 

so you can merge the 4 th row and onwards into a single field in the mapping

Regards,

Srinivas

Former Member
0 Kudos

Thanks srinivas. Problem solved.

Answers (0)