Previous Topic: SQL interface sectionNext Topic: TranslationTableCollection Section


InputFormatCollection Section

This section specifies the structure of data retrieved from data source-how a data row is to be cut into fields and what are the field types and formats. Initial data filtering and data manipulations may be performed in this section by using InputFormatSwitch and Compound fields respectively.

The general work-flow of this section is as follows:

The InputFormatCollection node may contain one or more InputFormat nodes.

XML Structure:

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