<odbc_access_mask id="aveva_wonderware" name="AVEVA" odbcsource="Aveva Historian" database_system="Wonderware" linked_server="INSQL" database="Runtime" schema="dbo" viewname="History" helpid="wonderwareaccessmaskdialog">
	<timespanrowfilter id="Time" caption="Time" mandatory="yes" dbcolumnname="DateTime" dbcolumntype="datetime" specification="absolute_or_relative"/>
	
	<categoricalrowfilter id="TagName" caption="Tags" mandatory="yes" multiselection="yes" viewname="Runtime.dbo.Tag" dbcolumnname="TagName" dbcolumntype="string"/>
	
	<selectsingleoption id="WonderwareRetrieval" caption="Retrieval" mandatory="yes" metainfo_key="wwRetrievalMode"
	tooltip="Select the retrieval mode that allows you to access the data stored in the AVEVA Historian.">
		<option id="IDInterpolated" caption="Interpolated" metainfo_value="Interpolated"/>
		<option id="IDIntegral" caption="Integral" metainfo_value="Integral"/>
		<option id="IDAverage" caption="Average" metainfo_value="Average"/>
		<option id="IDMinimum" caption="Minimum" metainfo_value="Minimum"/>
		<option id="IDMaximum" caption="Maximum" metainfo_value="Maximum"/>
		<option id="IDRawValues" caption="Raw Values" metainfo_value=""/>
	</selectsingleoption>
	
	<duration id="WonderwareRaster" caption="Raster" mandatory="yes"
	tooltip="Sets the resolution, the sampling interval for retrieving data, that is, the lenght of each cycle.
The number of cycles depends on the time period and the resolution: number of cycles = time period / resolution"/>
	
	<stringinput id="WonderwareExtraQuery" caption="Extra query" mandatory="no"
	tooltip="The ' AND ' text will be prepended to the text from the extra query field and the result will be appended to the WHERE clause of the resulting SQL query.
Beware that for the long table format the values of specified attributes should be wrapped in single quotes while for the wide table format in double quotes.
Example for long table format: wwInterpolationType='Linear'"/>
	
	<checkbox id="WonderwareWideTable" caption="Import as wide table (one column per tag)" is_active="true"
	tooltip="If checked, the table is imported in wide format meaning that every tag ends up as own column. Otherwise the table is imported in long format."/>
</odbc_access_mask>