Data Sources

Delimited Data Source

A Delimited Data Source with a separate column for Debit and Credit for the Amount Dimension is accomplished by using a Parser Complex Expression, or a Business Rule. First, assign the Debit column as the Amount.  Next, create a Parser Complex Expression if this is a one-time occurrence, or create a Business Rule if it can be applied to numerous Data Sources, and assign it to the Amount Column. In the Complex Expression or Business Rule, check the value returned for the Debit. If it is empty, or 0.00, refer to the credit value with the method outlined below.

Assessing the credit value is possible in OneStream because the transformation engine provides an array list of all fields in the line. In the example below, Debit is column six, and Credit is column 7.

Dim creditValue as String = api.Parser.DelimitedParsedValues(6)

This is a zero based list, so index six is equal to column seven in the Data Source. Using this expression would only return the credit value, so apply the statement above to a broader Complex Expression.