As part of the configuration of a process you will need to match the fields from the two data sets.
With Duco you can perform:
- Simple one-to-one matches between fields.
- Complex many-to-many field matches (you will require transformation rules to combine fields).
- Apply transformation rules to the input data.
Transformation rules are particularly important and are a central part of Duco. They enable you perform many types of data transformation operations within Duco, allowing you to use data without the need to pre-process.
Consider the following data sets:
Simple one-to-one field match
In some cases, field matching is straightforward. For example, it's clear that the field "Trade Date" from the "Internal" data set corresponds to the field "TrdDt" from the "Exchange" data set.
To match the fields, select first one field from one data set, then the corresponding field from the other data set and click on Add field.
Many-to-one field match
Some cases are more complicated. In our example, the "Internal" data set uses two fields, "Price" and "Currency" to represent a price and its currency. However, the "External" data set represents the equivalent information in only one field called "Premium" containing a value like "GBP3.21".
Duco can deal with this situation. The following example will show you how.
- Select both the fields "Price" and "Currency" from the "Internal" data set
- Select the field "Premium" from the Exchange data set
- Click on Add field
We now need to provide a rule for Duco to deal with the two-to-one relationship between the fields in the two data sets.
To do this we create a rule that combines the content of the fields "Price" and "Currency" from the "Internal" data set so that the resulting value can be compared with the content of the "Premium" field in the "Exchange" data set.
To combine the content of "Price" and "Currency" we can simply write a rule that reads: "Set to Price + Currency".
To compose this rule, navigate through the drop-down menus and select:
- "Set to something" → "Something + Something"
- On the left side of the "+" sign choose: "A field" → "Currency"
- On the right side of the "+" sign choose: "A field" → "Price"
- Click on Save
The result is as follows:
Transformation rules
As this page mentions from the beginning, transformation rules are a central part of Duco. You can perform many types of transformation operations within Duco without having to pre-process and "clean-up" your input data. Consider, for example, the following data sets, which represent data about payments.
As you can see, in Data Set 1, the "Amount" field contains both the currency and the actual payment amount. In Data Set 2, the payment currency and the amount are in different fields.
You can set up the process as follows:
- The fields Payer, Receiver, and Payment Date are a simple one-to-one match
- Match the fields Amount from Data Set 1 and Currency from Data Set 2.
- Use a transformation rule for Amount from Data Set 1.
- Match the fields Amount from Data Set 1 and Currency from Data Set 2.
- Use a transformation rule for Amount from Data Set 1.
The results look as follows:
Notice that in Data Set 1:
- The value "USD 100000" in the field Amount is transformed into "USD" and used in the Currency match field
- The value "USD 100000" in the field Amount is transformed into "100000" and used in the Amount match field
- The original value USD 100000 is not visible
If you want to make visible the original value in the results you can add the field Amount from Data Set 1 as a reported field.
The results now look as follows:
The page Rules using Natural Rule Language (NRL) lists and explains all the rules available in Duco. It is worth reading through this page to familiarize yourself with the rules available.
More on field match rules
As you were browsing through the drop-down menus to compose the rule to combine two fields, you will have noticed that Duco allows you to create many types of transformation rules.
For example:
- Set to field_a * field_b
- Set to the first 3 characters of field_c
- If field_d is less than 0 then set to 'Buy'
You can also create complex many-to-many field match rules to match multiple fields from the first data set with multiple fields from the second data set. We invite you to browse through the drop-down menus and explore how you can combine and convert field values. The page Rules using Natural Rule Language (NRL) describes in detail how to create rules.
Renaming and deleting a match field
When you match two fields, Duco creates a match field entry in the middle column. By default, the name of the match field entry is the same as the name of the matched field shown on the left column on the screen.
If you want, you can rename a match field.
- Click on Edit on the right of the match field entry.
- Enter a new name
If you have matched two (or more) fields, but then realise that you have made a mistake, you can delete the match field entry.
- Click on Delete on the right of the match field entry.