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?
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.
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.
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.
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.