Identifying Variables in the Data Source

After you define a data source, TurboIntegrator assigns a variable to each column in the source. You must identify these variables by type and content.

To illustrate this process, consider the following text data:

Table 1. sample text data
Column 1 Column 2 Column 3 Column 4 Column 5 Column 6
New England Massachusetts Boston Supermart Feb 2000000
New England Massachusetts Springfield Supermart Feb 1400000
New England Massachusetts Worcester Supermart Feb 2200000
New England Connecticut Hartford Supermart Feb 1240000
New England Connecticut New Haven Supermart Feb 2700000
New England Connecticut Greenwich Supermart Feb 1700000

The first 3 columns form a hierarchy for a Location dimension that you will build from the source text file:

  • The New England consolidation is at the top of the hierarchy.
  • The states Massachusetts and Connecticut are one level below New England.
  • The third column, containing city names such as Boston and Hartford, supplies simple elements at the lowest level of the hierarchy.
  • The remaining columns are not used for the creation of the Location dimension.

Here is the Variables tab on the TurboIntegrator window for this data structure:

Table 2. Variables tab
Variable Name Variable Type Sample Value

V1

String

New England

V1

String

New England

Massachusetts

String

Massachusetts

Boston

String

Boston

SuperMart

String

SuperMart

Feb

String

Feb

V6

Numeric

2000000

TurboIntegrator assigns a variable name to each column, and assigns a variable type based on the sample value for each column.

The default variables names, such as V1 and Massachusetts, can be changed. It is good practice to give the variables a meaningful name. Having meaningful names makes the TurboIntegrator scripts easier to read and troubleshoot.

To edit a variable name, click the name in the Variable Name column and type a new name. For this exercise, the names of the first three variables were edited like this:

Sample Value Variable Name
New England Region
Massachusetts State
Boston City

A variable name must begin with a letter, and can contain only these characters:

Character

Description

Upper-case Letters

A through Z

Lower-Case Letters

a through z

Digits

0 through 9

Period

.

Underscore

_

Dollar Sign

$

The Variable Type field identifies the contents of the column. For instance, the first column of this data contains the string "New England". TurboIntegrator correctly identifies the variable type as String.

Note: The Variable Type fields are usually set accurately for ASCII data, but not for data extracted from an ODBC data source.

The Contents field can be defined with one of these settings:

Option

Description

Ignore

Ignore the contents of the column when processing the data source.

Element

The column contains simple elements for the dimension you want to create.

Consolidation

The column contains consolidated elements for the dimension you want to create.

Data

The column contains data values.

For this example, you should ignore the column containing the data values. Columns containing data values are not imported when you are creating a dimension.

Attribute

The column contains element attributes for the dimension you want to create.

Other

The column contains data that does not fall into any of the previous four categories. Typically, this setting is used for columns containing data that will be processed through custom variables and formulas.

The text data in this example contains elements and consolidations for a Location dimension:

  • It does not contain any attributes.
  • It does contain data values, but those values are irrelevant to the creation of the Location dimension, as are the elements from other dimensions.

To define the variables for the Location dimension:

Procedure

  1. Click the Variables tab on the TurboIntegrator window.
  2. Set the Contents field for variables Region, State, and City as specified here:
    Variable Content
    Region Consolidation
    State Consolidation
    City Element
    • The variable Region is now identified as a consolidation
    • The variable State is also identified as a consolidation
    • The variable City is identified as a leaf level (non-consolidated) element.