cancel
Showing results for 
Search instead for 
Did you mean: 

how to create one canonical item from two raw item

Former Member
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

former_member224482
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

thank you Robin. I try multiple transformations and get back to you.

Former Member
0 Kudos

hi robin,

I could merge two raw item into one canonical. thanks you for your corporation!

saket_chiluveru
Explorer
0 Kudos

Hi Robin,

in this case, would the attribute value be simply concatenated (without any concat character )?

former_member224482
Active Contributor
0 Kudos

No. Keys are matched, values are replaced, collections are appended.

saket_chiluveru
Explorer
0 Kudos

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 = "".

Answers (0)