Skip to main content

Foreign Keys and cross referencing

Availability-noteDeprecated
Talend MDM sends the XML record, without resolving the FKs. It is up to the Smart View to lookup/resolve them.

As the Process is a multi-step pipeline, you can have one or several steps before the final XSLT step. So you will need to insert a step to resolve your FKs and/or cross referencing. You can use a Talend Job deployed as a ZIP or you can use a <parameters>

<CrossRef>

<xrefName>Country</xrefName>

<xrefCluster>crossreferencing</xrefCluster>

<xrefRootElement>/Product</xrefRootElement>

<xrefIn>

<mapping>

<xrefElement>CountryCode</xrefElement>

<xrefPath>Countries/ISO2</xrefPath>

</mapping>

</xrefIn>

<xrefOut>

<mapping>

<xrefElement>CountryName</xrefElement>

<xrefPath>Countries/Name</xrefPath>

</mapping>

</xrefOut>

</CrossRef>

</parameters> step.

First example: if the data model is Product with a FK to ProductFamily, use the following parameters to resolve the product family, which is the raw family code (e.g. "[1234]"), to the actual family name:

<parameters> 
   <CrossRef> 
       <xrefName>FamilyFK</xrefName>  
       <xrefCluster>Product</xrefCluster>  
       <xrefRootElement>/Product</xrefRootElement>  
       <xrefIn> 
            <mapping> 
                <xrefElement>Family</xrefElement>  
                <xrefPath>ProductFamily/Id</xrefPath> 
            </mapping> 
       </xrefIn>  
       <xrefOut> 
            <mapping> 
                <xrefElement>Family</xrefElement>
             <xrefPath>ProductFamily/Name</xrefPath> 
        </mapping> 
      </xrefOut> 
   </CrossRef> 
</parameters>

Second example: if there is a Countries cross reference table with key = ISO2 and value = Name and you want to resolve Product/CountryCode into Product/CountryName, use the following parameters:

<parameters> 
   <CrossRef> 
       <xrefName>Country</xrefName>  
       <xrefCluster>crossreferencing</xrefCluster>  
       <xrefRootElement>/Product</xrefRootElement>  
       <xrefIn> 
          <mapping> 
              <xrefElement>CountryCode</xrefElement>  
              <xrefPath>Countries/ISO2</xrefPath> 
          </mapping> 
       </xrefIn>  
       <xrefOut> 
          <mapping> 
              <xrefElement>CountryName</xrefElement>  
              <xrefPath>Countries/Name</xrefPath> 
          </mapping> 
       </xrefOut> 
    </CrossRef> 
</parameters>

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!