Adding a CSV Parser component

The line that is extracted by the previous Fixed-Size Line Set Extractor is made up of three fields. Each of these fields is separated by a comma. Example:

15,2012-01-03 11:55:26,Internet,Smith

Where:

You add a CSV Parser to the tree. This component:

To add and set up a CSV Parser

  1. In the tree of the scenario window, make sure that the last component is active; otherwise, click the last component to make the component toolbar available.

  1. On the component toolbar, select Modifiers, and then click CSV Parser. A CSV Parser component is added to the tree. You can set it up in the identification area.

  1. In the identification area, in Name, type ReadCDRs as the name of the component.

  2. In Description, type Parse the CDRs with a CSV format.

  3. Click the Configuration tab.

  4. In the Property to parse list, select the consumptionLine property created by the previous modifier component.

  1. In Field separator, click the Comma option. The consumptionLine property has a CSV format with a comma as a separator. You must now name the line tokens which are parsed according to the CDR file header: #duration,date,service,login.

  1. Click the Mapping tab.

  1. In the Mapping rules table, click four times to add four rows to the table.

  1. Double-click the first row in the Name column, type duration, and then do the following:

  1. In the Rules column, select is token number.

  2. In the Value column, type 0.

  1. Double-click the second line in the Name column, type date, and then do the following:

  1. In the Rules column, select is token number.

  1. In the Value column, type 1.

  1. Double-click the third line in the Name column, type service, and then do the following:

  1. In the Rules column, select is token number.

  2. In the Value column, type 2.

  1. Double-click the fourth line in the Name column, type login, and then do the following:

  1. In the Rules column, select is token number.

  2. In the Value column, type 3.

 

Next step: Add the third modifier (a Chargeable Item).