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. See "Complex Data Types" for an explanation of vectors and subrecords.
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 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 non-nullable 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 will be 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
Shows a Make Subrecord stage with a single input link and a single output link

The stage editor has three pages:

  • Stage Page. This is always present and is used to specify general information about the stage.
  • Input Page. This is where you specify the details about the single input set from which you are selecting records.
  • Output Page. This is where you specify details about the processed data being output from the stage.