Page 1 of 1

Invalid field type in call to getInputFieldAsString()

Posted: Wed Sep 29, 2010 4:15 am
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 *]

Posted: Wed Sep 29, 2010 7:01 am
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.

Re: Datastage Error

Posted: Wed Sep 29, 2010 7:17 am
by agpt
Seems like you are trying to nonstring value as string

Posted: Wed Sep 29, 2010 9:01 am
by chulett
Post the sql.

Posted: Wed Sep 29, 2010 11:40 pm
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'),?)

Posted: Sat Jun 11, 2011 11:15 am
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.