Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. make the Configuration file for the import module and store in the ModuleConfigFiles directory. In this example it should be named Import 1.00 default.xml
  2. register this new module in the ModuleInstanceDescriptors 1.00 default.xml file in the RegionConfigFiles directory
  3. Add the new module at a workflow in order to run it.

Step 1: Configure the import module (create the configuration File)

The first step is to configure an instance of the import module for the type of data you need to import. In this example we will import data in PI XML format for 4 locations. The file we want to import is shown below:

...

This information is needed to configure the TimeseriesSet in the import module. A quick look at the files file shows that there are four locations: LocA, LocB, LocC and LocD. Only one parameter is present (WaterLevel) and the data comes in hourly timesteps.

Another type of information that we will need is the location at which Delft-Fews can find to files to be imported. For this example we assume the files will be located in c:/Import/PI .The configuration XML file for the import module that will read the files is shown below:

With this we can make the file below:

Info

Please see the Delft-Fews configuration guide for detailed information on how to configure the Import modules. In addition, the .xsd schema file will provide documentation.

No Format
<?xml version="1.0" encoding="UTF-8"?>
<timeSeriesImportRun xmlns="http://www.wldelft.nl/fews"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.wldelft.nl/fews
http://fews.wldelft.nl/schemas/version1.0/timeSeriesImportRun.xsd">
	<import>
		<general>
			<importType>PI</importType> <!-- Indicated we will read PI Files -->
			<folder>c:/Import/PI</folder> <!-- read the files from here -->
                                                      <!-- Files WILL BE DELETED after import -->
			<failedFolder>c:/Backup/PI</failedFolder>
                                <!-- If specified the imported files will be copied to this location -->
			<idMapId>IdImport</idMapId> <!-- The IdMap for this import -->
			<importTimeZone>
				<timeZoneOffset>+00:00</timeZoneOffset>
			</importTimeZone>
		</general>
		<timeSeriesSet>
			<moduleInstanceId>Import</moduleInstanceId> <!-- The name of this moduleinstance -->
			<valueType>scalar</valueType>
			<parameterId>H.obs</parameterId> <!-- The parameter as it will be stored in Delft-Fews,
                                                          different from the parameter in the XML. Therefore,
                                                          IdMapping has to be set up-->
			<locationSetId>LevelGauges</locationSetId>
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="hour" multiplier="1"/>
			<readWriteMode>add originals</readWriteMode>
			<synchLevel>1</synchLevel>
		</timeSeriesSet>
	</import>
</timeSeriesImportRun>

...