This section gives examples of input and output data from
a Column Export stage.
This section gives examples of input and
output data from a Column Export stage to give you a better idea of
how the stage works.
In this example the Column
Export stage extracts data from three input columns and outputs two
of them in a single column of type string and passes the other through.
The example assumes that the job is running sequentially. The column
definitions for the input data set are as follows:
Table 1. Column
definitions
Column name
SQL type
Length
Scale
value
Decimal
5
2
SN
SmallInt
1
code
Char
4
The following are the rows from the input
data set:
Table 2. Input data set
value
SN
code
000.00
0
aaaa
001.00
1
bbbb
002.00
2
cccc
003.00
3
dddd
004.00
4
eeee
005.00
5
ffff
006.00
6
gggg
007.00
7
hhhh
008.00
8
iiii
009.00
9
jjjj
The import table definition is supplied on
the Output PageColumns tab. For the
example, the definition would be:
Table 3. Column definitions
for output
Column name
SQL type
Length
Scale
code
Char
4
exported_col
Char
You have to give InfoSphere® DataStage® information
about how to delimit the exported data when it combines it into a
single column. This is done on the Input page Format
Tab. For this example, you specify a data format of text,
a Field Delimiter of comma, and a Quote type of double.
Figure 1. Format tab
.
The Properties of the Column Export stage
are set as follows:Figure 2. Properties tab