Page 1 of 1

Teradata Enterprise Stage loading problem

Posted: Thu Dec 06, 2007 6:04 am
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 ?

Posted: Thu Dec 06, 2007 1:24 pm
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.

Posted: Sat Dec 08, 2007 4:08 am
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
)