Transformer and job parameters type

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
Mat01
Premium Member
Premium Member
Posts: 50
Joined: Wed Jun 02, 2004 11:12 am
Location: Montreal, Canada

Transformer and job parameters type

Post 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
mandyli
Premium Member
Premium Member
Posts: 898
Joined: Wed May 26, 2004 10:45 pm
Location: Chicago

Post 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.
Mat01
Premium Member
Premium Member
Posts: 50
Joined: Wed Jun 02, 2004 11:12 am
Location: Montreal, Canada

Post 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
Peytot
Participant
Posts: 145
Joined: Wed Jun 04, 2003 7:56 am
Location: France

Post 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
gh_amitava
Participant
Posts: 75
Joined: Tue May 13, 2003 4:14 am
Location: California
Contact:

Post by gh_amitava »

Hi,

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

Regards
Amitava
dsxdev
Participant
Posts: 92
Joined: Mon Sep 20, 2004 8:37 am

Post 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.
Happy DataStaging
Post Reply