前のトピック: SQL インターフェース セクション

次のトピック: TranslationTableCollection セクション

InputFormatCollection セクション

このセクションでは、データ行をフィールドに分割する方法およびフィールド タイプや形式など、データ ソースから取得したデータの構造を指定します。 初期データ フィルタリングおよびデータ操作は、InputFormatSwitch フィールドおよび Compound フィールドをそれぞれ使用して、このセクションで実行される場合があります。

このセクションの一般的なワークフローを以下に示します。

InputFormatCollection ノードには 1 つ以上の InputFormat ノードが含まれていることがあります。

XML 構造:

<InputFormatCollection>
	<InputFormat InputFormatName="MyInputFormat">
	<InputFormatFields> 
		<InputFormatField Name="sid_id" Type="string"/>
		<InputFormatField Name="content" Type="string"/>
		<InputFormatField Name="date" Type="time" 
               TimeFormat="%d/%m/%Y %H:%M:%S"/>
		<InputFormatField Name="server" Type="string" 
               Source="compound">
		<Compound>
			<Segment SourceField="content" 
                     RegularExpression=".*Job server: ([^\n]+).*" />
		</Compound>
		</InputFormatField>
	</InputFormatFields>
<TranslatorSwitch DefaultTranslator="GeoTranslator">
	<TranslatorCase  TranslatorName="NonGeoTranslator" Break="yes">
		<Condition SourceField="routing_info" Operator="EQ"
             Value="cnano"/>
	</TranslatorCase>
</TranslatorSwitch>
</InputFormat>
</InputFormatCollection>