...
An example configuration can be seen below where the different properties are defined in SampleProperties.csv and the custom value type "SOURCE" in Bron.csv. By using %<column>% there can be referred to the content of the columns in the csv file. It is also possible to define properties directly in xml, this is shown in <property .../> elements
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?> <sampleMetadataSchema xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews httphttps://fewsfewsdocs.wldelftdeltares.nl/schemas/version1.0/sampleMetadataSchema.xsd"> <valueTypes> <string id="TEXT"/> <enumerationsCsvFile> <file>Bron.csv</file> <id>SOURCE</id> <code>%BRON%</code> <label>%NAME%</label> </enumerationsCsvFile> </valueTypes> <properties> <propertiesCsvFile> <file>SampleProperties.csv</file> <charset>UTF-8</charset> <id>%id%</id> <name>%name%</name> <valueTypeId>%valueTypeId%</valueTypeId> <scope>%scope%</scope> </propertiesCsvFile> <property id="testSampleProperty" name="Sample Property" valueTypeId="TEXT" scope="sample"/> <property id="testValueProperty" name="Value Property" valueTypeId="TEXT" scope="value"/> </properties> </sampleMetadataSchema> |
...
No Format |
---|
id,name,valueTypeId,scope EMP_NR_A,Medewerker analyse,TEXT,sample EXT_REF,Externe referentie,TEXT,sample SMP_NAME,Monster omschrijving,TEXT,sample COST_CODE,Projectcode,TEXT,sample BRON,Bron,SOURCE,sample WEIGHT,Gewicht,TEXT,value |
The property "BRON" however has the custom value type "SOURCE" which is defined as an enumeration in the file Bron.csv (located in MaplayerFiles config directory). This means the values of the property "BRON" can only have the values "Visdata_Waternet_2006-2012 V4" or "MACFT2010LIJN"
No Format |
---|
BRON;NAME Visdata_Waternet_2006-2012 V4;Visdata_Waternet_2006-2012 V4 MACFT2010LIJN;MACFT2010LIJN |
Since 2020.02 it is possible to import properties for individual values too. It is therefore possible to distinguish which properties should be applied to the whole sample and which only to individual values within the sample. For this the element "scope" has been introduced. This can be "sample" when the property is a sample property which means it applies to a whole sample, or "value" which means it is a value property and it only applies to a single value. When scope is not defined it will be "sample" by default.
In the example below, a table is defined as part of the timeSeriesImportRun configuration. The first property column, "COST_CODE", refers to sample properties (because "COST_CODE" is defined in SampleMetadataScheme.xml), while the second property column "testValueProperty" refers to a value property.
Code Block |
---|
<table>
<propertyColumn name="COST_CODE" key="COST_CODE"/>
<propertyColumn name="testValueProperty" key="testValueProperty"/>
<valueColumn name="Waarde"/>
</table> |