Mapping Columns to Constants

There may be cases where a Table instance or Table Descriptor upstream in the data flow does not contain a Column needed for mapping by a Table Descriptor or Table instance Column downstream in the data flow.

  • A source Table instance does not contain a Column that is needed for mapping by a source Table Descriptor

  • A target Table Descriptor does not have a Column needed for mapping by the target Table instance

In these cases, you can map the existing Column of the source Table Descriptor or target Table instance to a constant by supplying a default value for the Column. Figure 3-3 shows how to supply constants for Columns in relation to the data flow direction.

If you are supplying a constant as a value to a Column whose data type is not Varchar2, you must provide conversion information. For example, to convert the text you enter as the constant to the Date data type, enter the value 04-JAN-2005 in the Default Value column, and enter DD-MON-YYYY in the Format String column. The system reads the constant as a date.

For any data type, the value after conversion cannot exceed the length defined for the Column.

NULL is a valid constant value (if allowed by the receiving Column).

When you pass a constant to a Column downstream from it in the data flow (either to a source Table Descriptor Column or a target Table instance Column (see Figure 3-3), the specific requirements differ according to the data type of the receiving Column, as follows:

Varchar2: If you pass a constant to a Column with a data type of Varchar2, the length of the constant must be less than or equal to the length of the Column.

Number: If you pass a constant to a Column with a data type of Number, the following rules apply:

  • You must provide a number format (with a default) and the constant must be valid when passed to a to_number with the supplied number format.

  • The length of number produced by to_number (constant, number format) must be <= the length of the Column.

  • The precision of number produced by to_number (constant, number format) must be <= the precision of the Column.

Date: You must provide a date format and the constant must be valid when passed to a to_date with the supplied number format.

Null: Allowed EXCEPT if mapping from a target Table Descriptor to a Table instance Column that is not nullable.

Figure 3-3 Data Flow from Table Instances to Program Instance to Table Instances

Description of Figure 3-3 follows
Description of "Figure 3-3 Data Flow from Table Instances to Program Instance to Table Instances"