Last updated: Nov 07, 2024
This section gives examples of input and output data from a Split Subrecord.
This section gives examples of input and output data from a Split Subrecord stage to give you a better idea of how the stage works.
In this example the Split
Subrecord stage extracts data from a subrecord containing three vectors.
The data is output in fours column, three carrying the vectors from
the subrecord, plus another column which is passed through the stage.
The example assumes that the job is running sequentially. The column
definitions for the input data set are as follows:
Column name | SQL type |
---|---|
key | Char |
parent | Char |
The following are the rows from the input data set (superscripts represents the vector index):
Key | Parent | ||||
---|---|---|---|---|---|
0 | 1 | 2 | 3 | ||
row | A | 12 | 13 | 4 | 64 |
Will | wombat | bill | William | ||
D | 0 | pad | pad | ||
B | 22 | 6 | 4 | 21 | |
Robin | Dally | Rob | RD | ||
G | A | pad | pad | ||
C | 76 | 0 | 52 | 2 | |
Beth | Betany | Bethany | Bets | ||
B | 7 | pad | pad | ||
D | 4 | 6 | 81 | 0 | |
Heathcliff | HC | Hchop | Horror | ||
A | 1 | pad | pad | ||
E | 2 | 4 | 6 | 8 | |
Chaz | Swot | Chazlet | Twerp | ||
C | H | pad | pad | ||
F | 18 | 8 | 5 | 8 | |
Kayser | Cuddles | KB | Ibn Kayeed | ||
M | 1 | pad | pad | ||
G | 12 | 10 | 6 | 43 | |
Jayne | Jane | J | JD | ||
F | 2 | pad | pad | ||
H | 12 | 0 | 6 | 43 | |
Ann | Anne | AK | AJK | ||
H | E | pad | pad | ||
I | 3 | 0 | 7 | 82 | |
Kath | Cath | Catherine | Katy | ||
C | H | pad | pad | ||
J | 5 | 0 | 7 | 02 | |
Rupert | Rupe | Woopert | puss | ||
B | C | pad | pad |
The stage outputs the data it extracts from
the subrecord in three separate columns each carrying a vector. The
column called key will be output separately. The output column definitions
are as follows:
Column name | SQL type |
---|---|
key | Char |
acol | Integer |
bcol | Char |
ccol | Char |
The Subrecord column property is set to 'parent' in the Properties tab.
The output data set will be (superscripts represents the vector index):
Key | acol | bcol | ccol | |
---|---|---|---|---|
row | A | 12013142643 | Wills0wombat1bill2william | D00 1 |
row | B | 2206142213 | Robin0Dally1Rob2RD3 | G0A1 |
row | C | 7600152223 | Beth0Betany1Bethany2Bets3 | B071 |
row | D | 406181203 | Heathcliff0HC1Hchop2Horror3 | A011 |
row | E | 20416283 | Chaz0Swot1Chazlet2Twerp3 | C0H1 |
row | F | 180815283 | kayser0Cuddles1KB2Ibn Kayeed3 | M011 |
row | G | 1201016213 | Jayne0Jane1J2JD3 | F021 |
row | H | 1200162433 | Ann0Anne1AK2AJK3 | H0E1 |
row | I | 300172823 | Kath0Cath1Catherine2Katy3 | 0H1 |
row | J | 500172023 | Rupert0Rupe1Woopert2puss3 | B0C1 |