外部キーと相互参照 - Cloud - 7.3

Talend Studioユーザーガイド

Version
Cloud
7.3
Language
日本語
Product
Talend Big Data
Talend Big Data Platform
Talend Cloud
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
ジョブデザインと開発
Last publication date
2024-02-13
対象製品...

Data Fabric

MDM Platform

Talend MDMは、FKを解決せずにXMLレコードを送ります。ルックアップ/解決はスマートビュー次第です。

プロセスは複数ステップのパイプラインであるため、最終XSLTステップの前に1つまたは複数のステップを含めることができます。したがって、FKの解決または相互参照のためにステップを挿入する必要があります。ZIPとしてデプロイされたTalendジョブを使用するか、<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.

最初の例: 最初のサンプル: データモデルがProductFamilyへのFKを持つProductの場合は、次のパラメーターを使用して製品ファミリーを解決します。これは実際のファミリー名に対する生のファミリーコード(たとえば"[1234]")です。

<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>

2番目の例:key = ISO2value = Nameを持つCountries相互参照テーブルがあり、Product/CountryCodeを解決してProduct/CountryNameにする場合は、次のパラメーターを使用します。

<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>