How to propagate parent value to child using dataload/import
book
Article ID: KB0070926
calendar_today
Updated On:
Description
While doing dataload operation, propagate the firstname value to the lastname. if you have a parent-child relationship and the parent has a first name,the child has a last name. Firstname value of the parent should also be propagated to lastname of the child using dataload operation even if last name is null, i.e When importing records, any values for the first name of the parent record in the csv file should be propagated to the last name of the child record.
For example :
You have Repository-RepTrack1 , Attribute-fnm1 and Repository-RepTrack2 , Attribute-fnm2. RepTrack1 and RepTrack2 has relationship Track1hasTrack2.
1.fnm1=Pooja and fnm2=null.
2. Now you need to pass the fnm1 value to fnm2 while doing dataload.
Issue/Introduction
How to propagate value from parent to child using data load/import records using MDM UI
Resolution
1.Find MQ_HOME/Common/Enterprise/Catalog/Master/Repository_ID/catalogvalidation.xml.
2. Add the below lines in cataogvalidation.xml
------------
<execution_directive first_pass="required"/>
<declare usage="regular">
<var>PTOCRELREC</var>
<link type="relationship_record">
<literal>Track1hasTrack2</literal>
</link>
</declare>
<constraint>
<name>AssignParentValueToChild</name>
<description>Assign Parent Value to Child Attribute</description>
<action>
<propagate type="inline">
<var>PTOCRELREC</var>
<action>
<assign>
<var>fnm2</var>
<var>LINK/fnm1</var>
</assign>
</action>
</propagate>
</action>
</constraint>
-----------------------------------
3. Give the path of the Rulebase file into EvaluateRuleBase activity which is present winwfin26catsourcev7.xml file.
e.g <Parameter direction="in" name="Rulebase" eval="constant" type="string">C:/MDM/MDM920_Oracle/MDM/mdm/9.2/common/TESTD/catalog/master/34395/catalogvalidation.xml</Parameter>
4.In ManageRecordCollectionDirectLoad activity make BundlingOption true and add RelationshipName in that.
e.g <Parameter direction="in" name="RelationshipName" type="string" eval="constant">Track1hasTrack2</Parameter>
<Parameter direction="in" name="BundlingOption" type="boolean" eval="constant">true</Parameter>
5. Create a CSV file and add data to it.
6. Upload csv file using the Upload Data Source option on MDM UI and import the record into the repository using the Input-map Import option.
7. The value of fnm1 of the parent from CSV file propagates to fnm2 of the child
Additional Information
Rulebase,Propagate,Dataload,Import Record
Attachments
How to propagate parent value to child using dataload/import
get_app
How to propagate parent value to child using dataload/import
get_app
How to propagate parent value to child using dataload/import
get_app
Feedback
thumb_up
Yes
thumb_down
No