Synonym Dictionary File¶
A synonym dictionary file enables users to handle challenges that arise because of inconsistencies in the headers in a data set. You can create a Synonym Dictionary file in a project to store the values for alternate headers in the source data. Centerprise will check for variants and match these variations at run-time to extract the incoming data. You can also use Synonym Dictionary file to facilitate automapping between objects on the flow diagram that use alternate names in field layouts.
Adding a Synonym Dictionary File to a Project¶
1. In the project explorer window, right-click on the object in the project tree where you want to add a synonym dictionary file and select Add New Item > Synonym Dictionary File.
2. Provide the name of the file and click Add and a new text file with a .Syn extension will be added to the project.
3. Synonym Dictionary File is a text-based file and you can specify alternate header values in a pipe-separated format.
Imagine that you collect shipping data from various customer organizations. Each of your customer organizations sends in the data but Organization A refers to shipping number as ShippingID, Organization B refers to it as Shipment_ID, and Organization C refers to the same data field as Shipment Number. Now you want to continuously process the incoming files through a single dataflow.
|Header value in default layout||Shipping Number|
|Alternate header value #1||ShippingID|
|Alternate header value #2||Shipment_ID|
|Alternate header value #3||Shipment Number|
You can add a synonym dictionary file to your project and specify the alternate header values used by your customers for shipping number. Centerprise will match for the values provided in the dictionary and read the data from the incoming source files containing the header variations. In the screenshot below, we have created a synonym file for the example illustrated above.
4. Save your synonym dictionary (.Syn) file and you can easily use the file for multiple dataflows within a project that use SmartMatch layout feature.
In the following section of the article, we will cover how you can enable the smart match reading option for file sources. When SmartMatch option is enabled, Centerprise will look for alternate header values defined in the synonym dictionary file and read the data from incoming file sources accordingly.
How to Use SmartMatch Option for File Sources¶
- Drag-and-drop the file source object from the Toolbox onto the designer. If the Toolbox is hidden, press Ctrl + Alt +X.
- Right click and select Properties from the context menu to go the properties of the file source.
- In the properties window, under the Advanced File Options, select the option that says Use SmartMatch with Synonym Dictionary.
Centerprise will now look for the alternate header options in the synonym dictionary file in the project and read the values for the header names that are different between the source layout in the dataflow and the incoming source file.