Parameter substitution

Parameter substitution

The following parameter substitution is available in DataMinder.

Here comes a short description of each case and examples of usage.

Common syntax to refer to column values: ${Column name}

When to use?

Used by tasks that may be configured to use column values to create new data like "Add values" task.

How does it work?

For example the task "Add values" can take other column values to create new strings using a template. Lets say we want to create SQL INSERT statements like this one:

INSERT INTO tUsers (firstName, lastName ,email) VALUES ('${FirstName}','${LastName}','${Email}')

Lets say we have a table with a number of users in columns: FirstName, LastName and Email.

In this case we can create multiple INSERT statements. One for each user in table like:

"Add values" task configuration

Implicit value substitution with first column value: $${Column name}

When to use?

When you need to get a value from a column. For instance replace each $${Folder Path} with a specific path.

How does it work?

The substitution is made before any task gets access to the parameter value. Meaning that the task only receive the string with replaced values.

Lets say you need to crete a number of file names to store content in. One file per row. You can then combine the implicit $${Column name} and the common syntax ${Column name} using "Add values" task to create the file names.

"Add values" task configuration

The folder path is set by first value in column "Folder Path" like "/diskA/folderA". And the unique file names are created by the "Simple counter" and "Add values" tasks. Note that the $${Column name} notation gets the same value for all rows. And ${Column name} in "Add values" task gets the column value from the same row.

Implicit value substitution with property values: @@{com.acme.MyPropertyValue}

When to use?

When you have properties that varies with the DataMinder installation.

How does it work?

The substitution is made before any task gets access to the parameter value. Meaning that the task only receive the string with replaced values.

Lets say you want to have multiple DataMinder instances with the same configuration but you need to have some properties to be instance specific. The implicit property value substitution allows you to do this.

Lets say you have a Docker image containing a DataMinder with a tested configuration ready for production. You man want to run multiple image instances to load balance DataMinders but each instance may have a specific temporary folder to be used.

By setting the property in the DataMinder property file to:

com.acme.tempFolderPath=/diskA/tempFolder1

You can refer to this property from your configurations and get the correct values. This means that you can reuse the same DataMinder Docker image with tested configurations and only modify the DataMinder property file to contain the specific instance specific parameters. This is a powerful feature that enables you to keep instance specific configuration in one place.

Note that the file path is implicitly substituted with the property value and this process and tasks are not dependent on the specific instance since the value of @@{com.acme.tempFolderPath} is stored in the property file and not in the configuration itself. This means that only the property file must contain instance specific values and not the process or task configurations.

"Add values" task configuration

Email:   Address: LucidArt AB Visby Sweden