Page 1 of 1

Transformer and job parameters type

Posted: Wed Sep 15, 2004 12:26 pm
by Mat01
Hi All,

I am building a transformer in PX. My job has integer type parameters but the transformer gives me a conversion error when I compile it (string to int32). When I look at the generated code, I see that my parameters are defined as string in the transformer code. Since I perform mathematical operations with theses params in the transformer, the compilation gives me an error. Does PX read every job parameters as strings or am I missing an option?

Thanks,

Mat

Posted: Thu Sep 16, 2004 5:23 am
by mandyli
Please check your parameter data type and you column data type.
If you want data type change from String to integer uses stage function for data type conversion.

Posted: Thu Sep 16, 2004 8:02 am
by Mat01
My data types (file, stage var and job params) are all integer, I have no string type in this job. I don't know why PX interprets the variables as strings. But it seems we also have compiler issues so this might be the problem.

Thanks

Mat

Posted: Thu Sep 16, 2004 8:30 am
by Peytot
That's right, your problem with the compilator can be the problem.
But, have you try to define the variable in your transform and put decimal in place of integer. If the result of your operation is a decimal, with integer as put cause a problem.

Pey

Posted: Tue Sep 28, 2004 1:03 pm
by gh_amitava
Hi,

Define your job parameters again. This might be due to metadata error.

Regards
Amitava

Posted: Wed Sep 29, 2004 8:17 am
by dsxdev
One possible cause would if you are assigning this job parameter value to a Stage variable or operating on job parameters to the Stage variable and then use it , in such a case you should define the Stage variable type.

if every thing looks fine just could be problem with metadata.