on 08-10-2009 7:11 PM
Hi all
My input text file is like this.
KAC v1 v2 v3 v4
5640 v51 v61 v71 v81
5640 v52 v62 v72 v82
5640 v53 v63 v73 v83
5640 v54 v64 v74 v84
which is a tab separated file.
Here I row is header field and Remaining Rows are Item values.
In this case what to set the keyfileld since header and body fields are different?
Hey
For header key Field will be KAC
for Line item it will be 5640
As far as i know,you would need key field to convert this structure since your recordset structure has at least one occurrence of *.
Header,1,Line_Item,*
Thanks
Aamir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>>If they send some other different fille (having different values),
key field must be static and must exist in the same place in all the files.
if you have dynamic key field,then it can't be done via FCC,you need to read each record individually and merge them via java mapping or UDF.
Thanks
Aamir
Edited by: Aamir Suhail on Aug 10, 2009 1:26 PM
Edited by: Aamir Suhail on Aug 10, 2009 1:37 PM
Hi sathish,
I am asking how to identify the keyfield for both header and Item fileds
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gabriel,
One workaround for this issue is in your record set structure you can give as header,1,Item,9999999. Here you are saying item will repeat 9999999 these many number of times. You can check with your legacy users or functional users till date the maximum number of records in a peak time. I dont think you will have more than this. If you want you can add one or two more 9s after checking with them. Please put the maximum number always to be on the safer side.
Then you should give this content conversion parameters:
Document Name: record (in my example i took like this you can change according to your message type)
Document Namespace:http://gabriel/demo
Recordset Namespace:http://gabriel/demo
Recordset Structure: header,1,Item,9999999
header.fieldSeparator: tab or five spaces
header.endSeparator:'nl'
Item.fieldSeparator:tab or five spaces
Item.endSeparator:'nl'
ignoreRecordsetName:true
header.fieldNames:header1,header2,header3,header4,header5
Item.fieldNames:Item1,Item2,Item3,Item4,Item5
I just tested with this parameters and it is working. The xml we see in moni before message processing is:
<?xml version="1.0" encoding="utf-8"?>
<ns:record xmlns:ns="http://gabriel/demo">
<header>
<header1>KAC</header1>
<header2>v1</header2>
<header3>v2</header3>
<header4>v3</header4>
<header5>v4</header5>
</header>
<Item>
<Item1>5640</Item1>
<Item2>v51</Item2>
<Item3>v61</Item3>
<Item4>v71</Item4>
<Item5>v81</Item5>
</Item>
<Item>
<Item1>5640</Item1>
<Item2>v52</Item2>
<Item3>v62</Item3>
<Item4>v72</Item4>
<Item5>v82</Item5>
</Item>
<Item>
<Item1>5640</Item1>
<Item2>v53</Item2>
<Item3>v63</Item3>
<Item4>v73</Item4>
<Item5>v83</Item5>
</Item>
<Item>
<Item1>5640</Item1>
<Item2>v54</Item2>
<Item3>v64</Item3>
<Item4>v74</Item4>
<Item5>v84</Item5>
</Item>
</ns:record>
When you put tab if it dont work then nab the tab as mentioned in this blog:
/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
Regards,
---Satish
Hi Gabriel,
You dont need a key field for this integration. You can have your recordset structure as Header,1,Items,*
and give this parameters:
Header.fieldSeparator : tab (put five spaces here)
Header.endSeparator : 'nl'
Items.fieldSeparator : tab (put five spaces here)
Items.endSeparator : 'nl'
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.