Invalid field type in call to getInputFieldAsString()

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
hemaarvind1
Participant
Posts: 50
Joined: Mon Jan 21, 2008 9:35 am

Invalid field type in call to getInputFieldAsString()

Post by hemaarvind1 »

I have a job where in I am retrieving data from an oracle table and doing an insert/update to the target table using change capture.

All the stages are Dynamic RDMS stages.

When I execute the job, I get the error as:

Invalid field type in call to getInputFieldAsString() for field '4' in input dataset '0'.

Could you please let me know in what scenarios this kind of errors come.

Thanks in advance.

[* Note - Title changed to be more descriptive - please avoid using titles like "DataStage Error" - as that applies to about 90% of the posts here and isn't helpful - Andy *]
hemaarvind1
Participant
Posts: 50
Joined: Mon Jan 21, 2008 9:35 am

Post by hemaarvind1 »

I just got a problem and a solution in relation to this topic.

FYI: There is a before SQL defined in the target DRS Insert stage. This does a delete operation based on the condition written.

In my case,the job is working sometimes and it is not working sometimes giving the below error:

Invalid field type in call to getInputFieldAsString() for field '4' in input dataset '0'.

Please help me in getting this problem resolved.
agpt
Participant
Posts: 151
Joined: Sun May 16, 2010 12:53 am

Re: Datastage Error

Post by agpt »

Seems like you are trying to nonstring value as string
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Post the sql.
-craig

"You can never have too many knives" -- Logan Nine Fingers
hemaarvind1
Participant
Posts: 50
Joined: Mon Jan 21, 2008 9:35 am

Post by hemaarvind1 »

The SQL is used is pasted below:

delete from cis_s_brands_dim where (brand_name in (select brand_name from s_brands@#$Stg_Db_Link#)
and brand_name in (select brand_name from cis_s_brands_dim where record_loaded_from = ' ')
and country_code in (select country_code from s_brands@#$Stg_Db_Link#) and country_Code in (select country_code from cis_s_brands_dim where record_loaded_from = ' '));
commit;


the insert statement that executes after this a generated SQL. It is pasted below:



INSERT INTO CIS_S_BRANDS_DIM (BRAND_KEY,COUNTRY_CODE,BRAND_NAME,PROMOTION_TYPE,BUSINESS_AREA,SRC_EXTRACT_DATE,RECORD_LOADED_FROM,CIS_DW_LOAD_DATE,CIS_DW_UPDATE_DATE,CIS_GLB_BRAND_KEY) VALUES (?,?,?,?,?,TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS'),?,TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS'),TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS'),?)
kumar_va
Participant
Posts: 25
Joined: Mon Aug 20, 2007 5:07 am

Post by kumar_va »

Hi,

Has this been resolved?

If yes, please share the resolution. In my case I am observing this issue while invoking a parallel shared container - which loads data using the DRS stage.

This shared container is used by other jobs as well and they are working fine.
Any suggestion would be helpful.

Thanks.
Post Reply