cancel
Showing results for 
Search instead for 
Did you mean: 

Content Conversion- Same keyfield value for two different sub structure

Former Member
0 Kudos

Hi,

I have a scenario where the key field value for the 2 substructure of record structure is same.

MY XML structure is like this :

<documentName>

<recordset>

<Header>

<field-nameA1>

<field-nameA2>

<field-nameA3>

<ITM1>

<field-nameB1>

<field-nameB2>

<field-nameB3>

<ROW1>

<field-nameB1>

<field-nameB2>

<field-nameB3>

<ITM2>

<field-nameB1>

<field-nameB2>

<field-nameB3>

<ROW2>

<field-nameB1>

<field-nameB2>

<field-nameB3>

The sample text file is given below where line no. 3 and 5 are different substructure(For ROW1 and ROW2 respectively) with same keyfield value.

"HDR",399,"file",20050302,100642,3289

"ITM1",2,3,4,5,6,7,8,9,10

"ROW",3,4,5,6

"ITM2",2,3,4,5,6,7,8,9,10

"ROW",7,8,9,10

After content conversion I get a XML structure in which there is no ROW2 and all data within the fields of ROW2 are put under ROW1 as the key field values are identical.

In the records only the first field is constant (e.g. ROW).

How to handle such a scenario?

Regards

Satish Chauhan

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Unless you can somehow expand the key, I don't know that this is possible. The key implies uniqueness - and in your case, unfortunately, it isn't. Is there any way to edit the structure to make it more unique for you? Do you have any control or ability to change that?

Maybe if you add unique keys in your mapping, you can strip them off with content conversion on the way out using the parameter keyFieldInStructure=ignore?

Former Member
0 Kudos

The sad part is we dont have the control over the incoming file.

Can this scenario be handled with configuring File adapter Module?

regards,

Satish