Teradata Enterprise Stage loading problem

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
DS_FocusGroup
Premium Member
Premium Member
Posts: 197
Joined: Sun Jul 15, 2007 11:45 pm
Location: Prague

Teradata Enterprise Stage loading problem

Post by DS_FocusGroup »

I have created jobs which loads data through enterrpise stage, now i want to add some extra columns to the all existing tables, which has a default value defined so that my existing jobs should work. Now while i was testing this approch i come accorss that defaults will not work with Enterprise stage if the loading method is "Append". because the work table created by Enterrpise stage don't have Deafult defined while it is created by datastage so null are inserted in the final table instead of deafualt, now if the default column was defined as NOT null the job crash in the end. Do anyone come across with this problem or not, any patch for it ?
landaghaar
Participant
Posts: 38
Joined: Wed Sep 19, 2007 10:11 am
Location: Canada

Post by landaghaar »

I think it is like SQL*Loader direct path. Default or triggers on a table work on a one row inserts. they wont work with bulk loads.

turn off bulk load and it should work, then it will be slow. so do your defaults on datastage, instead of a trigger by database.
DS_FocusGroup
Premium Member
Premium Member
Posts: 197
Joined: Sun Jul 15, 2007 11:45 pm
Location: Prague

Post by DS_FocusGroup »

thanks for your reply, the defualt do work with fastload in teradata, but the enterprise stage is modified in such away that it can load to already loaded tables, so what it do is that it create a temparary table to load the data and then do insert select from that temp table to the final target table, the porblem is that when datastage create the temp table it didn't create the default value so problem starts from there, now i have to modify all the jobs and add it manually. example is given below
e.g:
Target table:
Create table tableName
(
Number 1 integer Not NULL,
DateField Date default Current_Date
)

Temp table by datastage:

Create table ORCH_WORK_#####
(
Number 1 integer ,
DateField Date
)
Post Reply