Page 1 of 1

Problem in conversion

Posted: Wed Sep 05, 2007 12:18 am
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 ?


Posted: Wed Sep 05, 2007 12:24 am
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.

Posted: Wed Sep 05, 2007 1:05 am
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

Posted: Wed Sep 05, 2007 8:26 am
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

Posted: Wed Sep 05, 2007 11:06 pm
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 )"