cBase Input Object

The Integrator cBase input object accesses data that has been built into a standard cBase or returns information about the cBase (metadata). It can retrieve row level data that was used to build the cBase, or it can calculate a Spectre dive and return the results. The object returns data for all columns in the cBase. The order of the records are based on how they are stored in the cBase, which is how they were input into the build.

NOTE: Once the cBase data is pulled into an Integrator flow, it becomes untyped data again. The one exception is that date and period columns maintain the format from the cBase.

cBase Input Attributes

Attribute Type Description
input_type
(required)
String Defines the object as a cBase input object. The value of this string is "cbase".
cbase
(default)
String Specifies the filename for the input cBase. You can use a cPlan or Dive file here as either of these ultimately point to a cBase as described below. At least one cBase, cPlan, or Dive file is required.
aliases Array of Strings

Defines new column names for the columns already defined in the input data. Format is "oldname=newname". Blanks before or after the column names will be ignored. Spaces within a column name are acceptable. If newname is blank, then the given column is deleted from the output flow.

NOTE: This attribute is Alias_Lines in Visual Integrator.

cbase_list_input String

Specifies a separate input flow to generate a list of cBases. This string is an object name, not a filename. This input flow should have a column named "filename". The cBase input object uses the values in this column as a list of cBase file names to open as its input. To use cbase_list_input, two Input objects, one for the cbase_list_input and a second for the actual cBase input, are required.

This attribute allows programmatic control over the input to Integrator. Multiple cBases are combined at the detail level. Columns that do not appear in all cBases will appear as blank for the missing cBases. The input cBase names can be read from a file and processed using any of the Integrator process objects (with calculated fields, etc.). See the Directory Input Object for another alternative.

NOTE:If you use this attribute in an object, do not use the cbase, cbase_list_input, cplan, dive, or dimensions attributes in the same object.

cplan String Specifies a name for an input cPlan, which will be used to create a Spectre dive. When an input cPlan is specified, the return columns must be given by the dimensions and other_columns attributes. This attribute conflicts with the cbase, dive, cbase_list_input, or starname attributes.
dimensions Array of Strings Specifies a set of dimensions used to squash data from the cBase or cPlan into a Spectre Dive, similar to that of the squash object.
dive String Specifies a name for a Spectre dive file, which will create a Spectre dive and window to be returned as data from the cBase input object. The Spectre dive will contain a reference to a Spectre cPlan or cBase to use as input for the dive. This attribute conflicts with the cbase, cplan, cbase_list_input, or starname attributes.
encoding String

Defines the encoding returned from the cBase. While cBases are encoded in UTF-8 Unicode characters, the cBase input object is capable of returning data as Latin1 to match other data files being processed. Values include:

  • auto—The cBase input object will set the return encoding based on the Unicode state of other objects in the same task. If no other object deals with Unicode data, and the script itself is not encoded as Unicode, then the data will be returned as ISO-8859-1 or Latin1 characters (default)
  • utf-8—The cBase input object will return the data as UTF-8 Unicode characters as stored in the cBase. No translation or conversion will be performed by the cBase input object.

See also: Integrator Unicode Data Support.

filter String Defines a Spectre filter string used to filter rows on the input. This filter string is processed by the Spectre engine, and used to limit the rows based on the given expression. The browse button opens the Spectre Expressions Editor where you can input a filter expression (see Spectre Expressions Editor).
filter_columns Array of Strings Specifies the columns in the filter_input flow that are used to filter data in the cBase. These columns must appear in the filter_input flow and must be defined as string columns in the cBase. The cBase input object will return the data in the cBase that match the values in the filter_columns in the filter input flow. The filter_columns and filter attributes are mutually exclusive.
filter_input String

Specifies a separate input flow used to filter columns for a cBase. This input flow should have the columns specified in the filter_columns array. The values in the cBase that match the rows in this filter input flow will be returned. The filter_input and filter attributes are mutually exclusive.

NOTE: This attribute is Filter_Input in Visual Integrator.

first Integer Determines the number of records to be read from the input file. If used, Integrator reads up to the number of records specified. This limit is particularly useful for script testing on a small number of input records. If this attribute is not used, all rows are returned. This attribute is ignored if the metadata = "true" flag is present.
keep_columns Array of Strings Defines a list of columns to be kept by the input object. If this attribute is not used, all columns are kept. The output flow of the object is limited to those columns that are listed, and no excluded columns are available to subsequent process objects. Column names in the keep_columns array should be given after they are aliased or prepended with the prefix string.
metadata Boolean Allows the cBase input object to return metadata information about the field in the cBase instead of just cBase data when set to "true". When set to "false" or not specified, only cBase data is returned. The resulting flow will consist of one row per column.
The resulting flow will contain the columns shown in the next table (Columns resulting from metadata flow).
other_columns Array of Strings

Specifies other columns that will be returned in the squashed data defined by the dimensions attribute. These columns may be summaries or infos, depending on their type and how the summary properties are set in the underlying cBase.

NOTE: Columns specified here, when already specified as dimensions, are ignored.

prefix String Defines a prefix that is prepended to all columns in the flow that are not aliased using the aliases array. If you want a space between the prefix and the column name, include that space in the prefix string definition.
starname String

Defines a "star name" (file match string) for selecting a set of cBases based on a wildcard. Values include:

  • ? (question mark)—Matches any single character (case-insensitive).

  • * (asterisk)—Matches a sequence of characters (case insensitive).

Wildcard matching occurs within a single folder or directory; there is no matching across directories. Multiple cBases are combined at the detail level. Columns that do not appear in all cBases will appear as blank for the missing cBases. For example:

starname = “*.cbase” and starname = “*.?base” match all .cbase files.

NOTE: If you use this attribute in an object, do not use the cbase, cbase_list_input, cplan, dive, or dimensions attributes in the same object.

trace_after Sub-object Traces data flows leaving the object. This is equivalent to adding a Trace process object immediately after the current input object. See Embedded Trace Object.

Columns resulting from metadata flow

Column Description
Build Description Contains the filename of the Build file used to build the cBase specified via the cbase attribute.
Build Time Contains the date and time when the cBase was built. This is in the form of a Dimensional Insight standard date and time. For example: "2015-03-14 09:26:53"
Build Version Contains the version of the program used to build the cBase, e.g., "7.1(6)"
cBase Size Contains the total cBase size in bytes.
cBase Status Contains the value "Built".
Data Type Contains the data type (String, Double, etc) used to represent the cBase field. The values for the column will be one of "string", "integer", "fixed100", "double", "boolean", "date", "period", or "datetime".
Field Name Gives the name of the cBase field, e.g., "Salesperson"
Field Number Contains the field number within the cBase, with the first field in the cBase having field number "1".
Field Type Identifies the field as a Dimension, Summary, or Info Field. The values for the column will be one of "Dimension", "Summary", or "Info".
Filename Contains the filename of the cBase as given by the cbase attribute.
Format Contains the format defined for the field by the cBase build description.
Nullable Contains the value "true" if a field is set to be nullable; otherwise it will have the value "false". Blanks in nullable columns show up as empty strings. Zeroes in nullable columns show up as zeroes.
Number Values Contains the number of possible values in the column for string fields. For other field types, this column is blank.