© Copyright 2023, Astera Software
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. Astera 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.
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.
You can add a Synonym Dictionary File to your project and specify alternate header values used by your customers for shipping number. Astera 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, Astera will look for alternate header values defined in the synonym dictionary file and read data from incoming file sources accordingly.
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.
Astera 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.
Note: The SmartMatch feature to read alternate header values from a Synonym Dictionary file is available only for file sources (Fixed length, Delimited, and Excel Workbook sources).
Header value in default layout
Shipping Number
Alternate header value #1
ShippingID
Alternate header value #2
Shipment_ID
Alternate header value #3
Shipment Number