DataStage job SqlType
The column definition of the job will be specified as below example.
SqlType is defined as Number as shown below.
BEGIN DSSUBRECORD
Name "col1"
SqlType "1"
Precision "10"
Scale "0"
Nullable "0"
KeyPosition "0"
DisplaySize "0"
Group "0"
SortKey "0"
SortType "0"
AllowCRLF "0"
LevelNo "0"
Occurs "0"
PadNulls "0"
SignOption "0"
SortingOrder "0"
ArrayHandling "0"
SyncIndicator "0"
PadChar ""
ExtendedPrecision "0"
TaggedSubrec "0"
OccursVarying "0"
PKeyIsCaseless "0"
SCDPurpose "0"
END DSSUBRECORD
Below definition is imported from DB table definitions, then TableDef and NativeType are generated by DataStage.
With DataStage Designer SqlType was changed to "VarChar" but the NativeType was not changed.
BEGIN DSSUBRECORD
Name "AC_CO_CD"
SqlType "12"
Precision "20"
Scale "0"
Nullable "0"
KeyPosition "1"
DisplaySize "20"
Group "0"
SortKey "0"
SortType "0"
TableDef "Database\\TEST_DB2\\ADMIN.ODS_ITEM_KANJI_ITEM"
FieldPos "1"
AllowCRLF "0"
LevelNo "0"
NativeType "NVARCHAR"
Occurs "0"
PadNulls "0"
SignOption "0"
SortingOrder "0"
ArrayHandling "0"
SyncIndicator "0"
PadChar ""
ColumnReference "AC_CO_CD"
ExtendedPrecision "0"
TaggedSubrec "0"
OccursVarying "0"
PKeyIsCaseless "0"
SCDPurpose "0"
END DSSUBRECORD
SqlType is defined as Number as shown below.
BEGIN DSSUBRECORD
Name "col1"
SqlType "1"
Precision "10"
Scale "0"
Nullable "0"
KeyPosition "0"
DisplaySize "0"
Group "0"
SortKey "0"
SortType "0"
AllowCRLF "0"
LevelNo "0"
Occurs "0"
PadNulls "0"
SignOption "0"
SortingOrder "0"
ArrayHandling "0"
SyncIndicator "0"
PadChar ""
ExtendedPrecision "0"
TaggedSubrec "0"
OccursVarying "0"
PKeyIsCaseless "0"
SCDPurpose "0"
END DSSUBRECORD
SQL TYPE = {
"LongNVarChar", // -10
"NVarChar", // -9
"NChar", // -8
"Bit", // -7
"TinyInt", // -6
"BigInt", // -5
"LongVarBinary", // -4
"VarBinary", // -3
"Binary", // -2
"LongVarChar", // -1
"Unknown", // 0
"Char", // 1
"Numeric", // 2
"Decimal", // 3
"Integer", // 4
"SmallInt", // 5
"Float", // 6
"Real", // 7
"Double", // 8
"Date", // 9
"Time", // 10
"Timestamp", // 11
"VarChar"}; // 12
Below definition is imported from DB table definitions, then TableDef and NativeType are generated by DataStage.
With DataStage Designer SqlType was changed to "VarChar" but the NativeType was not changed.
Name "AC_CO_CD"
SqlType "12"
Precision "20"
Scale "0"
Nullable "0"
KeyPosition "1"
DisplaySize "20"
Group "0"
SortKey "0"
SortType "0"
TableDef "Database\\TEST_DB2\\ADMIN.ODS_ITEM_KANJI_ITEM"
FieldPos "1"
AllowCRLF "0"
LevelNo "0"
NativeType "NVARCHAR"
Occurs "0"
PadNulls "0"
SignOption "0"
SortingOrder "0"
ArrayHandling "0"
SyncIndicator "0"
PadChar ""
ColumnReference "AC_CO_CD"
ExtendedPrecision "0"
TaggedSubrec "0"
OccursVarying "0"
PKeyIsCaseless "0"
SCDPurpose "0"
END DSSUBRECORD
コメント
コメントを投稿