VI cBase Input Object
The Visual Integrator (VI) cBase input object brings cBase data into the script.
The cBase input object accesses column data in a standard cBase or returns the metadata about the cBase. It can retrieve the row-level data that was used to build the cBase directly from the cBase or through a cPlan. The cBase input object can also calculate a Spectre dive and return the results. The object returns data for all columns in the cBase. The order of the records is based on how they are stored in the cBase, which is how they were input into the build.
NOTE:
- Visual Integrator 7.1 can read cBases created in 7.0, but Visual Integrator 7.0 cannot read cBases created in 7.1.
- After the cBase data is pulled into a VI data flow, the cBase data becomes untyped data.
The cBase input object has three panes where you set attributes.
You set attributes for the cBase input object in the object attributes pane.
Attribute | Description |
---|---|
cBase/ cPlan/ dive |
Defines one or more input files as follows:
|
Input File Type | Defines the file type used (cbase, cplan, or dive). This box is filled in automatically to reflect the chosen input file. Defaults to the cbase file type. |
First |
Specifies a number to limit how many records are read from each input file. This attribute is useful for script testing on a small number of records. If not used, all rows are read. |
Prefix |
Defines a prefix that is added to all column names in the flow. If you want a space between the prefix and the column name, include that space in the prefix string definition. Any columns assigned an alias do not use the prefix; instead, the columns use the alias name. |
Metadata |
Specifies if the cBase input object passes metadata about the fields in the cBase, or just the cBase data itself. This attribute applies only when you enter a cBase in the cBase/cPlan/dive attribute.
When the Metadata attribute is true, the cBase input object returns the following Metadata Fields
|
Filter |
Defines a Spectre filter string to use to filter rows on the input. The Spectre engine processes this filter string and uses it to limit the rows based on the given expression. As an example, a filter such as: value("facility code")="PLN" keeps rows where the facility code column has a value of "PLN". The browse button opens the Spectre Expressions Editor where you can input a filter expression. For more information, see Spectre Expressions Editor. TIP: Integrator's $ Parameter substitution is performed on this expression before handing it to the Spectre engine to run. |
Filter_Input |
Specifies a separate input flow containing filtered columns for a cBase. The input flow must specify the columns by selecting the corresponding Filter check boxes in the cBase input object's column grid. The values in the cBase that match the rows in this filter input flow are returned, providing fast access to the detail data based on the cBase dimensions. In effect, the cBase is used as an indexed file. To implement the Filter_Input attribute, you create a separate input object.
Do not use both the Filter_Input attribute and the Filter attribute because they are mutually exclusive. |
Alias_Lines |
Aliases can be set and edited in both the Alias_Lines attribute and the column grid. The column grid allows for graphical editing, while the Alias_Lines attribute is set at the code level in the following format: OldColumnName=NewColumnName For example: inv_nbr=Invoice Number Where Invoice Number is the alias for inv_nbr. The Alias_Lines method is useful for working with array parameters used as aliases. VI cannot process these array parameters because they are not in a format that VI can interpret. VI considers these array parameters to be malformed aliases and displays a warning message in the Logs tab. For example: Alias definition "$(ExternalAliases)" in object "From List" is not formatted as "OldColumn=NewColumn". When the line contains a parameter Integrator is most likely able to resolve it when the parameter is properly defined. To edit this alias definition use the "Alias_Lines" property. This message indicates that there is a malformed alias named $(ExternalAliases) in the object named From List. The array parameter displays as $(ExternalAliases) in the script. For VI to interpret this array parameter, you must assign an alias in the VI format. To assign an alias and resolve the error:
|
Each object has an area where you can enter comments.
It is a DI best practice to enter a note for every object in a VI script. You can set a VI preference to give a warning for each object without a note.
The cBase input object column grid displays the columns from the input files.
Attribute | Description |
---|---|
Name |
Displays the name of each input column. This attribute is read-only. |
Alias |
Defines alternate names for any of the input columns. Spaces before or after an alias column name are ignored. Spaces within an alias column name are acceptable. |
Keep Order |
Manages the order that columns display in the output data flow. By default, columns that are passed to the next object in the data flow are displayed in the order that they appear in the Name column. You can change this order by typing a number in the Keep Order column. When you assign a Keep Order number, the Keep column is checked automatically. The Keep Order numbers might reorder to accommodate any changes you make. |
Keep |
Manages which columns are kept in the output data flow. If no columns have a Keep check mark, all columns are kept in the output data flow, except for any explicitly marked Remove. Select the Keep check box for columns you want to explicitly keep in the output data flow. A number is automatically added in the Keep Order column when you select its Keep check box. After marking any column with a Keep check mark, only those marked Keep are kept in the output data flow. NOTE: After any Keep check boxes are checked, do not use the Remove check boxes as clicking a Remove check box sets all Keep check boxes to unchecked. |
Remove |
Manages which columns are removed from the output data flow. Select the Remove check box for columns that you want to explicitly suppress from the output data flow. NOTE: Use the Remove check boxes only when no Keep check boxes are checked. |
Filter | Filters data in the cBase based on the selected columns. These columns must appear in the input object specified by the Filter_Input attribute and be defined as string columns in the cBase. Select Filter for each input column that you want to filter. |
Dim |
Specifies the dimensions to use to squash data from the cBase or cPlan into a Spectre Dive, similar to that of the squash object. Select the Dim check box for each input column that you want to specify as a dimension. |
Other |
Specifies other columns that are returned in the squashed data defined by the dimensions attribute. These columns might be summaries or infos, depending on their type and how the summary properties are set in the underlying cBase. Select the check box for each input column that you want to specify as other. NOTE: Columns specified here, when already specified as dimensions, are ignored. |