map 要素パラメータ

map によって、元データから対象データにデータがマッピングされます。マッピング処理中に関数を適用することによって入力データを変更できます。

<map>
		<target/> <!-- generated output path --!>
		<source/> <!-- full path into input data -->
<map>

パラメータ

  • target

    出力データに生成される完全な対象パスを指定します。このパラメータは必須です。

  • source

    入力データの完全な元データのパスを指定します。複数の source を指定できます。この場合、source は表示される順序で出力ファイルに書き込まれます。

例 1

次の例では、元データの 1 つのフィールドが出力データの 1 つのフィールドに直接書き込まれます。

<!--Map the purchase order description to the sales order description.-->
<map>
		<target>SSTSInput/Payload/SalesOrder/Sol_Descr</target>
		<source>SSTSOutput/Payload/PurchaseOrder/Pol_Descr</source>
</map>

例 2

次の例では、元データの複数のフィールドが対象データの 1 つのフィールドにマッピングされます。元データでは日付の 3 つのフィールドが指定され、対象データでは 1 つのフィールドのみが必要になります。

<!--Map the year, month and day from the input to the date field in the output.  Since no function is provided, the source fields are written in the order they appear, creating the output MMDDYY.
-->
<map>
		<target>SSTSInput/Payload/SalesOrder/Date</target>
		<source>SSTSOutput/Payload/PurchaseOrder/Date/Month</source>
		<source>SSTSOutput/Payload/PurchaseOrder/Date/Day</source>
		<source>SSTSOutput/Payload/PurchaseOrder/Date/Year</source>
</map>

例 3

<!--Generates a target date using a user-provided function.-->
<map>
		<target>SSTSInput/Payload/SalesOrder/Date</target>
		<source name='month'>SSTSOutput/Payload/PurchaseOrder/Date/Month</source>
		<source name='day'>SSTSOutput/Payload/PurchaseOrder/Date/Day</source>
		<source name='year'>SSTSOutput/Payload/PurchaseOrder/Date/Year</source>
</map>