on 08-12-2010 2:12 PM
Hi All,
I have a Multiple valued Flat Multi Look up Table.. In MDM this field stores A,B,C but while syndicating I want to create a seperate Node
<Root>
<Text>
<Value>
</Text>
</Root>
<Root>
<Text>
<A>
</Text>
<Text>
<B>
</Text>
<Text>
<C>
</Text>
</Root>
How can I acheive this?
Thanks
Rajeev
Hi Rajeev,
As per my understanding, If you want to use Split Multi-valued fields option, for this you need to consider below points.
1. You can not map source multi-fields with target single field.
2. As you are using XML file format how it would dynamically judge the source values and then convert separate node.
I mean if source has 4 multi-valued values then create this node 4 times, if 2 then create this Text node 2 times.
As a workaround, you should know what is the maximum values possible for this single main table record. Say 4.
So your target structure should have always four text field irrespective of source values:
<Root>
<Text>
</Text>
<Text>
</Text>
<Text>
</Text>
<Text>
</Text>
</Root>
After splitting your multivalued into 4 , right click on field-->Split Multi-valued field = 4.
Map all the four newly created fields with corresponding target 4 fields Text. But in this case sometimes its possible that all of your target 4 Text fields are not populated as it the maximum split value.
e.g Main table(DF) Multi-valuedField(Max multi-valued field can contains 4 values)
123 1,2,3,4
124 1,2
125 1
126 1,5,6
127 1,3,4,5
So if you are syndicating record 123 and 124 and 125 out of MDM, it will have below structure.
<Root>
<Text>1</Text>
<Text>2</Text>
<Text>3</Text>
<Text>4</Text>
</Root>
<Root>
<Text>1</Text>
<Text>2</Text>
<Text/>
<Text/>
</Root>
<Root>
<Text>1</Text>
<Text/>
<Text/>
<Text/>
</Root>
So I would suggest use PI/XI to achieve this efficiently. Using PI, you can create node as per the values available for record, if 2 then will create only two text nodes, if 4 then 4 as you can write UDF in PI to find the exact values and create exact node generation as per the values in source.
Regards,
Mandeep Saini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
So in real projects how the solution would be for LookupFlat Multivalue field??? They have to create multiple elements if the output format is XML??
OR is there any other solution to escape this?
Comming to change to XSD.. Can any one let me know how to make change to fulfill the syndicatiion.. where I want to have Root1 NODE repeat for each value..
Presently I have the XSD of following structure..
<xs:element name="Root" minOccurs="0" >
-
<xs:complexType>
-
<xs:sequence>
-
<xs:element name="Root1" minOccurs="0" maxOccurs="unbounded">
-
<xs:complexType>
-
<xs:sequence>
-
<xs:element name="Text" type="xs:string" minOccurs="0"/>
-
</xs:sequence>
-
<xs:attribute name="UpdateTimeStamp" type="xs:string"/>
-
</xs:complexType>
-
</xs:element>
-
</xs:sequence>
-
</xs:complexType>
</xs:element>
Eg: Text values in MDM are AAA,BBB,CCC and I want to syndicate following way along with main record..
<Root>
---<Root1>
-
<Text>AAA</Text>
---</Root1>
---<Root1>
-
<Text>BBB</Text>
---</Root1>
---<Root1>
-
<Text>CCC</Text>
---</Root1>
</Root>
Thanks
Rajeev
Hi Rajeev,
Text values in MDM are AAA,BBB,CCC and I want to syndicate following way along with main record..
Please Use PI/XI to achieve this. Using PI this thing can be achieved easily where your source field has values as AAA,BBB,CCC and you split this comma separated values and then at target structure you can get repeatable nodes for each of these values in the desired format as shown below:
<Root>
---<Root1>
-----<Text>AAA</Text>
---</Root1>
---<Root1>
-----<Text>BBB</Text>
---</Root1>
---<Root1>
-----<Text>CCC</Text>
---</Root1>
</Root>
Regards,
Mandeep Saini
No I dont have PI inbetween.. And wondering how to achieve this.. Is this a defect of MDM or it has to be like this?
If its not possible then I need to create a Qualifier Look Up table (Multivalued) and go through? If I create Qaul then its not the right modeling ......
Any suggestions or alternatives?
At the end XML should be somet hing like this
<Root>
---<Root1 Update TimeStanp>
-
<Text>AAA</Text>
---<Root1>
---<Root1 Update TimeStanp>
-
<Text>BBB</Text>
---<Root1>
---<Root1 Update TimeStanp>
-
<Text>CCC</Text>
---<Root1>
<Root>
Thanks
Rajeev
Hey,
>>Is this a defect of MDM or it has to be like this?
No it is not a defect in MDM, thats the way it is suppoed to be
You can not split Flat Multi-Valued lookup tables during syndication.
You need to use either Qualified Lookup table or Tuples.
Both will generate dynamic (repeating) attributes after the syndication to XML.
We have similar requirement and are using Tuples in most of the cases, in case where you can't do that, you can handle in PI, but it requires Advanced User Defined Functions for it, it is not as simple as it seems
Thanks
Aamir
Edited by: Aamir Suhail on Aug 13, 2010 3:04 PM
Hi ,
There is an option in syndicator of Splitting a Multi-Valued Field into Multiple Fields
You can check on page 79 in syndicator guide
If you have any confusion then please get back to us.
Thanks,
Sudhanshu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am able to split in to numbers but when I map to the target I can map only one and the out put I see only one value.. but I want the output repeating to the number of values I have..
Source has following strucute:
Root--LookUp[Multivalues]
---RemoteKey
-
Text
<xs:element name="Root" minOccurs="0" >
-
<xs:complexType>
-
<xs:sequence>
-
<xs:element name="Root1" minOccurs="0" maxOccurs="unbounded">
-
<xs:complexType>
-
<xs:sequence>
-
<xs:element name="Text" type="xs:string" minOccurs="0"/>
-
</xs:sequence>
-
<xs:attribute name="UpdateTimeStamp" type="xs:string"/>
-
</xs:complexType>
-
</xs:element>
-
</xs:sequence>
-
</xs:complexType>
</xs:element>
How can I get the multiple values in the output with the above strucutre:
Thanks
Rajeev
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.