Skip to Content
author's profile photo Former Member
Former Member

how to create one canonical item from two raw item

hi experts,

I'm new to data hub. I would like to composite one canonical item from two different raw item. Is there any way to do that without custom hundler?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Apr 27, 2016 at 11:46 PM

    Simply provide multiple transformations.
    Example :

     <item>
         <type>CanonicalAttribute</type>
         <attributes>
             <attribute>
                 <name>attributeID</name>
                 <transformations>
                     <transformation>
                         <rawSource>RawCHRMAS</rawSource>
                         <expression>E1CABNM-ATNAM</expression>
                     </transformation>
                     <transformation>
                         <rawSource>RawCLSMAS</rawSource>
                         <expression>E1KLAHM-E1KSMLM-ATNAM</expression>
                     </transformation>
                 </transformations>
             </attribute>
             <attribute>
                 <name>categoryType</name>
                 <transformations>
                     <transformation>
                         <rawSource>RawCLSMAS</rawSource>
                         <expression>E1KLAHM-KLART</expression>
                     </transformation>
                 </transformations>
             </attribute>
             <attribute>
                 <name>attributeType</name>
                 <transformations>
                     <transformation>
                         <rawSource>RawCHRMAS</rawSource>
                         <expression>E1CABNM-ATFOR</expression>
                     </transformation>
                 </transformations>
             </attribute>
             ...
    

    As you can see the categoryType is populated from RawCLSMAS and attributeType from RawCHRMAS while both raw are mapping the primaryKey field attributeID.

    Add a comment
    10|10000 characters needed characters exceeded

    • To clarify, in the above example attributeID is mapped to E1CABNM-ATNAM & E1KLAHM-E1KSMLM-ATNAM. And if attributeID is not a collection i.e. a single valued field then then the value will be the second attribute E1KLAHM-E1KSMLM-ATNAM. Is that correct ? If E1CABNM-ATNAM = "A" and E1KLAHM-E1KSMLM-ATNAM="", then attributeID = "".

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.