ThomsonDataLoader UtilityThe ThomsonDataLoader is a utility program that loads flat file data, provided by Thomson Financial, into the afstrade database. Thomson provides mostly customer position data, however, they also supply all associated security and account information for these positions. This program loads two general types of information
The ThomsonDataLoader is actually a very generic interface, that has the format of the data defined through two separate configuration files 1) the lookup configuration file and 2) the primary configuration file. The names of these files is specified in the afstrade.ini file (see below). This application also requires the afstrade.ini file to determine to which database records are saved. Configuration filesThis program uses two configuration files to define the format of the data to be imported. If the format of the Thomson data is changed or enhanced, it is the intent that only these configuration files need to be changed (as opposed to having to change this application). The format of the Thomson data files is defined in the Fixed Income Datafeed Manual from Thomson Financial. The individual configuration files are validated when the program starts to identify any potential errors, which are reported back to the user. The two configuration files are described next. Lookup Configuration FileLookup files contain Thomson Lookup data, and are loaded to later map Thomson codes to AFS codes. All lookup data is loaded into the lookups_ext table in the afstrade database. The lookup configuration file contains one line for each Thomson Lookup file. The format of a line in the lookup configuration file is defined as: <afs_table_name>, <thomson_filename>, <start_position>, <field_width>, <description_start>, <description_width>
Example lookup configuration file:
Primary Configuration FileThis configuration file defines the format of the Thomson Primary and Supplemental Files and how this data is mapped to afstrade tables. This file is broken up into blocks, each block defining how data from a file is loaded into an afstrade table. The format of a block is as follows: Line 1: [<afs table name>]
For example
afstrade.iniOther than the database parameters, the following entries are required for the program: [ThomsonDataLoader] Running the ApplicationAfter double clicking on the ThomsonDataLoader icon, the main form is displayed.
To process the Thomson data, simply click on the Yes button and select the file to process. If the Insert Thomson Lookups flag is set, this program will validate the lookup configuration file. The lookups are then loaded into the database, and compared to the existing records. If there are any records added, the user is asked if they want to edit the lookups. If the answer is OK, the following form opens up to allow the user the modify the mapping:
Only the AFS Code value is editable. When complete, the user should select the Save button to write the changes to the database. Selecting Revert will discard any changes. If the Insert Primary Files flag is selected, the primary configuration file is first validated. Each block in the configuration file is then processed, where each record in the data file is read, parsed, and then inserted directly into a specified database table (only for the can_insert case). If the record already exists, the program updates the record. If the block is set to update only, the insert case is bypassed and the database record is updated. The progress bars indicate the progress of both the individual data file and the overall load progress. A log file is also generated and saved to the file system. The process can be paused or stopped at any time by selecting the Cancel button. Notes
Release Notes |