cancel
Showing results for 
Search instead for 
Did you mean: 

Content Conversion for multi level heirarchy

Former Member
0 Kudos

Gurus,

I have the following scenario

FileXIFile

Input File structure is as follows

FH|............ (occurs 1)

FE|............. (occurs *)

FED|........... (child of FE and can occur * under FE)

FT|.............. (occurs 1)

The file contents are pipe delimited.

Example file

FH|.....

FE|........

FED|........

FED|.........

FE|.......

FED|........

........

FT|............

As stated above, FED recordtype can occur multiple times under FE

My inbound message structure is

.....Header (1)

........ErrorRecord (0,unbounded)

.............ErrorDataRec (0,unbounded)

.....Trailer (1)

Recordset Structure - Header,1,ErrorRecord,,ErrorDataRec,,Trailer,1

Recordset Sequence - Variable

KeyFieldName - RecordType

Content Parameters

I have defined field separator as pipe for each recordset

I have defined keyFieldValue for each recordset

I have defined fieldNames for each recordset

Here is my problem

The file loads ok. However, ErrorDataRec loads at the same level as ErrorRecord rather than loading under it.

I have played with fieldNames to define ErrorDataRec as a field under ErrorRecord and not definining as one, doesnot seem to make a difference.

I need someway to tell the parser that ErrorDataRec needs to be loaded as a substructure of ErrorRecord.

Anyone has any ideas?

Regards

Haseeb

Accepted Solutions (0)

Answers (1)

Answers (1)

VijayKonam
Active Contributor
0 Kudos

Haseeb,

The file adapter parsing itself is designed in that way. You can not have multiple hierarchy at that level. How ever, since you have the key fields identifying the records, you can shift the levels of the FED records as you want using some node functions like split by value in the mapping.

VJ

Former Member
0 Kudos

VJ,

You are absolutely right it is not possible to get multiple hierarchy using file content conversion.

Splitbyvalue function would not work in my scenario as I need to group FED records based on first few characters in the first column of FED records. I wrote a UDF to insert context change based on the column value.

Thanks again for your help.

Regards

Haseeb