0 / 0
Make Subrecord stage in DataStage

Make Subrecord stage

The Make Subrecord stage combines specified vectors in an input data set into a vector of subrecords whose columns have the names and data types of the original vectors. The Split Subrecord stage performs the inverse operation.

The Make Subrecord stage is a restructure stage. It can have a single input link and a single output link.

The Make Subrecord stage combines specified vectors in an input data set into a vector of subrecords whose columns have the names and data types of the original vectors. You specify the vector columns to be made into a vector of subrecords and the name of the new subrecord.
Shows how four separate columns are combined into a single subrecord

The Split Subrecord stage performs the inverse operation. See "Split Subrecord Stage."

The length of the subrecord vector that is created by this operator equals the length of the longest vector column from which it is created. If a variable-length vector column was used in subrecord creation, the subrecord vector is also of variable length.

Vectors that are smaller than the largest combined vector are padded with default values: NULL for nullable columns and the corresponding type-dependent value for nonnullable columns. When the Make Subrecord stage encounters mismatched vector lengths, it warns you by writing to the job log.

You can also use the stage to make a simple subrecord rather than a vector of subrecords. If your input columns are simple data types rather than vectors, they are used to build a vector of subrecords of length 1 - effectively a simple subrecord.

Shows how four columns can be combined into a vector of subrecords

The stage editor has three tabs:

  • Stage tab. This tab is always present and is used to specify general information about the stage.
  • Input tab. This tab is where you specify the details about the single input set from which you are selecting records.
  • Output tab. This tab is where you specify details about the processed data being output from the stage.
Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more