Tagged columns

You can use schemas to define tagged columns (similar to C unions), with the data type tagged. Defining a record with a tagged type allows each record of a data set to have a different data type for the tagged column.

You define the tagged columns with the data type tagged using schemas. When your application writes to a field in a tagged column, InfoSphere DataStage updates the tag, which identifies it as having the type of the column that is referenced.

The data type of a tagged columns can be of any data type except tagged or subrec. For example, the following record defines a tagged subrecord field:


record ( tagField:tagged (
   aField:string;
   bField:int32;
   cField:sfloat;
)   ;
)

In the example above, the data type of tagField can be one of following: a variable-length string, an int32, or an sfloat.