Problem in conversion

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
hamzaqk
Participant
Posts: 249
Joined: Tue Apr 17, 2007 5:50 am
Location: islamabad

Problem in conversion

Post by hamzaqk »

Hi all,

went through the forms pertaining to this but did not get much help. i am trying to load a file with four columns into a table. the mapping is like

Code: Select all


source_field:                                   target_field

SRC_CUSIP_ID       (int 10)                  SRC_CUSIP_ID ( integer 4)
PSTNBalance           (dec 17)                PSTNBalance   ( dec 8)
PSTNShareQuantity  (int 4)                   PSTNShareQuantity  ( int 4)
CUSIP_ID                (int 10)                 CUSIP_ID ( int 4)

its giving me error on the third field when i use this in the modify stage 
Specification= PSTNShareQuantity:int8= PSTNShareQuantity
error:

Teradata_Enterprise_2: Type mismatch for field 'SRC_CUSIP_ID'. Fatal error.
Type mismatch for field 'PSTNShareQuantity'. Fatal error.
Type mismatch for field 'PSTNBalance'. Fatal error.



how can you overcome this problem ? should it not just trim the records when i do the conversion ?

ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The error is from Teradata, not from the Modify stage.

Please document the Modify stage specifications that you have used.

Please also import the table definition from Teradata using orchdbutil (from the Import menu). Advise whether that is the same as the one you've used in your job design.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
hamzaqk
Participant
Posts: 249
Joined: Tue Apr 17, 2007 5:50 am
Location: islamabad

Post by hamzaqk »

Thanks ray .. i already imported the schema like that. the source length is int 10 and the target length in TD table is also int 4( which has length 10 in teradata) . it just gives a type mis match error

Code: Select all

Keep CUSIP_ID, pstn_bal_amt,pstn_share_qty,SR_CUSP_ID

Specification:   CUSIP_ID=CUSIP_ID
Specification:   PSTNBalance=PSTNBalance
Specification:   PSTNShareQuantity= PSTNShareQuantity
Specification:   SRC_CUSIP_ID= SRC_CUSIP_ID
ccatania
Premium Member
Premium Member
Posts: 68
Joined: Thu Sep 08, 2005 5:42 am
Location: Raleigh
Contact:

Post by ccatania »

The source field and target field attributes that you displayed are correct, most times TD will generate this error if the value of the field is not numeric, NULL or some other bogus data value.

Put some NUlltoZero or Space handling logic in the Transform for these fields.

charlie
hamzaqk
Participant
Posts: 249
Joined: Tue Apr 17, 2007 5:50 am
Location: islamabad

Post by hamzaqk »

thanks charlie. got around that problem . not getting some create table issues for the work table. any ideas where it creates the work table orch_work in the enterprise stage before it starts loading?

i do have access do the db where i am loading the data but still it gives me :

Teradata_Enterprise_15: execDirect failed for "create table ORCH_WORK_31e6e3bd (SRC_CUSIP_ID integer , PSTNBalance integer , PSTNShareQuantity integer , CUSIP_ID integer ) primary index (CUSIP_ID )"
Post Reply