Dynamically overriding configuration elements

Since version 2.5 of DataCleaner it is possible to override elements in the configuration file dynamically from the command line. This is a feature which can be useful in scenarios where you want the to invoke the same job but with slightly different configuration details.

For example, you might want to reuse the same job to be executed on several similar CSV files, or similar database environments. Let us assume that you have a CSV datastore that is defined like this:

			</datastore-catalog>
			  <csv-datastore name="My csv file">
			    <filename>/path/to/file.csv</filename>
			  </csv-datastore>
			</datastore-catalog>
		

To override the filename dynamically, you have to specify the property path (datastore catalog, then datastore name, then property name) with a '-D' parameter on the command line. Furthermore any spaces or dashes are removed and the succeeding character is uppercased. In the end it will look like "camelCase" strings, like this:

DataCleaner-console.exe ... -DdatastoreCatalog.myCsvFile.filename=anotherfile.csv
		

This mechanism can be used for any configuration property within the datastore catalog and reference data catalog.