Synonym Dictionary File¶
A Synonym Dictionary File enables users to handle challenges that arise because of inconsistencies in the headers of datasets. 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 panel, 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. A new text file with a .Syn extension will be added to the project.
3. Synonym Dictionary File is a text-based file where 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 alternate header values used by your customers for shipping number. Centerprise will match for values provided in the dictionary and read 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 the 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 the SmartMatch option is enabled, Centerprise will look for alternate header values defined in the synonym dictionary file and read 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.
- In the properties window, under the Advanced File Options, select the Use SmartMatch with Synonym Dictionary option.
Centerprise will now look for alternate header options in the Synonym Dictionary file in the project and read values for the header names that are different between the source layout in the dataflow and the incoming source file.