Teradata Multi Load uodate fail

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
bikan
Premium Member
Premium Member
Posts: 128
Joined: Thu Jun 08, 2006 5:27 am

Teradata Multi Load uodate fail

Post by bikan »

Hi I am getting following error in multiload report file.

USING A(DECIMAL(18,0)), B(DECIMAL(18,0)) UPDATE Table_X
SET A = :B
WHERE A = :A;
**** 10:03:57 UTY0805 RDBMS failure, 3538: A MultiLoad UPDATE Statement is Invalid.

The job has sequential file ( Col A, B). transformer & Teradata multi load stage.
I am using load typr custom & In Script- Custom tab I have following script.
.DML label updates;
UPDATE Table_X
SET A= :B
WHERE A = :A;
.DML label deletes;
DELETE FROM Table_X
WHERE A = :A;
.DML label inserts;
INSERT Table_X (A,
B)
VALUES (:A,
:B);
.import INFILE #$PATH#/data/input.dat
format fastload layout internal
apply updates where 1=1;
hamzaqk
Participant
Posts: 249
Joined: Tue Apr 17, 2007 5:50 am
Location: islamabad

Post by hamzaqk »

Paste the entire code generated by the stage. What areyou trying to achieve here as you are deleting, updating and inserting at the same time ?
Teradata Certified Master V2R5
bikan
Premium Member
Premium Member
Posts: 128
Joined: Thu Jun 08, 2006 5:27 am

Post by bikan »

I want to do update only
hamzaqk
Participant
Posts: 249
Joined: Tue Apr 17, 2007 5:50 am
Location: islamabad

Post by hamzaqk »

well if its just a simple update select the method" update" from the drop down list and it should work ok.
Teradata Certified Master V2R5
toshea
Participant
Posts: 79
Joined: Thu Aug 14, 2008 6:46 pm

Post by toshea »

It appears that your UPDATE statement is trying to change the value of the primary key. Perhaps MultiLoad does not support such an operation?
hamzaqk
Participant
Posts: 249
Joined: Tue Apr 17, 2007 5:50 am
Location: islamabad

Post by hamzaqk »

Well there is no issue in TD when it comes to updating the UPI or PI. it wil do it and just redistribute the table. I think its the problem with the what is being specified in the update script by him which is giving an error. Are you generating the script or trying to use a custom one?
Teradata Certified Master V2R5
shershahkhan
Participant
Posts: 64
Joined: Fri Jan 25, 2008 4:41 am

Post by shershahkhan »

Check the table defination, MLOAD update will only work if you specify the whole primary key in the Where clause else it will not work. I think A is not the only key in the Primary Index.
toshea
Participant
Posts: 79
Joined: Thu Aug 14, 2008 6:46 pm

Post by toshea »

Here's the description of error 3538 in the Teradata Messages manual. The problem is that you are trying to update the primary index which is not supported by MultiLoad. For future reference, you can find the Teradata Messages manual for each release here:

http://www.info.teradata.com/DataWareho ... m=Messages

3538 A MultiLoad UPDATE Statement is Invalid.
Explanation: The user has provided an UPDATE
statement in a MultiLoad Complex Import Task that
does not fully specify a primary index value, does not
fully specify the values of all the partitioning columns,
or modifies the primary index or partitioning columns.
Generated By: OPT modules.
For Whom: End User.
Remedy: Correct the error and resubmit the request.
The WHERE condition, including any taken from a
view definition, must allow for primary index access
(and, if partitioned, partition access) with possible
ANDed residual conditions. The list of updated fields
must not include any column in the primary index or
partitioning expression, and only one table may be referenced.
Post Reply