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,2004-01-03 11:55:26,Internet,Smith
Where:
15 is the call duration
2004-01-03 11:55:26 is the date
Internet is the service identifier
Smith is the login (or user identifier)
You add a CSV Parser to the tree. This component:
Parses and divides into three tokens the line sent by the previous component
Names each token
Sends the tokens to the next component of the tree
To add and set up a CSV Parser
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.
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.
In the identification area, in Name, type ReadCDRs as the name of the component.
In Description, type Parse the CDRs with a CSV format.
Click the Configuration tab.
In the Property to parse list, select the consumptionLine property created by the previous modifier component.
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.
Click the Mapping tab.
In the Mapping rules table, click
four times
to add four rows to the table.
Double-click the first row in the Name column, type duration, and then do the following:
In the Rules column, select is token number.
In the Value column, type 0.
Double-click the second line in the Name column, type date, and then do the following:
In the Rules column, select is token number.
In the Value column, type 1.
Double-click the third line in the Name column, type service, and then do the following:
In the Rules column, select is token number.
In the Value column, type 2.
Double-click the fourth line in the Name column, type login, and then do the following:
In the Rules column, select is token number.
In the Value column, type 3.
Next step: Add the third modifier (a Chargeable Item).