on 09-29-2014 7:46 PM
Hi experts,
I have a question regarding a File to Proxy scenario which uses FCC.
We have a source file which contains different rows of different structure, like:
HDR:123:Test:783:1000:20130101:HBA’
REC1:Test:20130404:Description’
REC1:Test:20130820:Description2’
REC2:GBR:Test:20130810’
…
The number of record types can vary (except the HDR record which only occurs once).
The XML structure after FCC looks as follows:
<Header>
Contains HDR record type fields
</Header
<Item_REC1>
Contains REC1 record type fields of occurrence 1 in file
</Item_REC1>
<Item_REC1>
Contains REC1 record type fields of occurrence 2 in file
</Item_REC1>
<Item_REC2>
Contains REC2 record type fields of occurrence 1 in file
</Item_REC2>
…
This file needs to be transferred into a generic proxy structure which has one header and a 1:n sub-structure which holds a subset of all fields of all different record types REC1, REC2, REC3, etc.
The format looks as follows:
Header (should hold HDR record)
|__Item 1 (should hold all other record types, like REC1, REC2, REC3, etc.)
|__Item 2
|__Item 3
As mentioned sub-structure Item contains specific fields of all record types, means all record types (except HDR) need to be mapped to this generic structure.
How do I achieve this?
Thanks a lot for your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harald -
What i meant was, read the entire line into a string so that your xml should be something like
<fileline>
<line>HDR:123:Test:783:1000:20130101:HBA</line>
</fileline>
<fileline>
<line>REC1:Test:20130404:Description</line>
</fileline>
<fileline>
<line>REC1:Test:20130820:Description2</line>
</fileline>
and then during the graphical mapping, you can identify which record type the line belong to.
If the line starts with HDR then apply your mapping rules accordingly and map it to proxy structure's header segment.
Hi,
If you know what kind of records of you are getting, then you can use FCC with key field. In mapping, duplicate the Item node for each source record type. I hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.