Interesting warning error before modify stage!

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
splayer
Charter Member
Charter Member
Posts: 502
Joined: Mon Apr 12, 2004 5:01 pm

Interesting warning error before modify stage!

Post by splayer »

I have a job as follows:

DataSet -> Xfm1 -> Modify -> SequentialFile

I have 1 specification in the Modify stage as:

OutCol1:decimal[10]=decimal_from_string(InCol1)


The job runs fine other than a few warnings. I had questions about 2 specific
warnings:

1)Xfm1: When checking operator: Dropping component "OutCol1" because of a prior component with the same name.

2)Xfm1: When checking operator: When binding output schema variable "APT_TRoutput0Rec0": When binding output interface field "InCol1"
to field "OutCol1": Conversion from source type "string[12]" to result type "decimal[10,0]": Possible range limitation.

This doesn't make sense to me. My questions are:

1)On warning #1:
There is no column in either the input or output tab of the transformer named OutCol1.

2)On warning #2: Why would these warnings come from the transformer stage? There is no column in either the input or output tab of the transformer named OutCol1. This column is on the output tab of the modify stage. There is no conversion happening on the transformer. It is being used as a straight copy.
uegodawa
Participant
Posts: 71
Joined: Thu Apr 27, 2006 12:46 pm

Post by uegodawa »

I can't understand that why do you use a transformer in between DataSet and Modify Stage. Modify stage is a light weight Transformer. Can you drop the Transformer stage and link the output of DataSet to Modify Stage. This may resolve your problem.
Thanks,
Upul
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

Un-check your RCP, then warning messages will be gone.
splayer
Charter Member
Charter Member
Posts: 502
Joined: Mon Apr 12, 2004 5:01 pm

Post by splayer »

I added the transformer because I didn't want to use a KEEP specification for so many columns. Anyway, I removed it and I also unchecked RCP. Now, I get the warning on the target sequential file stage:

SequentialFile: When checking operator: When binding input interface field "LoanNumber" to field "LoanNumber": Implicit conversion from source type "decimal[10,0]" to result type "int32": Possible range limitation.
uegodawa
Participant
Posts: 71
Joined: Thu Apr 27, 2006 12:46 pm

Post by uegodawa »

This may be due to different types of Metadata defined for LoanNumber column. Make sure that both input/output has same type of metadata. In this case specially precision should be same for both input/output.
Thanks,
Upul
uegodawa
Participant
Posts: 71
Joined: Thu Apr 27, 2006 12:46 pm

Post by uegodawa »

This may be due to different types of Metadata defined for LoanNumber column. Make sure that both input/output has same type of metadata. In this case specially precision should be same for both input/output.
Thanks,
Upul
splayer
Charter Member
Charter Member
Posts: 502
Joined: Mon Apr 12, 2004 5:01 pm

Post by splayer »

Its a straight copy from the Modify stage to the SeqFile stage. Actually, whatever is in the output tab of the Modify stage goes automatically to the seqfile stage so there is now way that metadata will be different.
uegodawa
Participant
Posts: 71
Joined: Thu Apr 27, 2006 12:46 pm

Post by uegodawa »

Can you provide the following details.
1. What is the datatype of Input tab of Modify Stage (LoanNumber)
2. What is the datatype of Output tab of Modify Stage (LoanNumber)
3. What is the Specification for this column ?
Thanks,
Upul
splayer
Charter Member
Charter Member
Posts: 502
Joined: Mon Apr 12, 2004 5:01 pm

Post by splayer »

Input data type is char(12) and output is integer(10). The specification I used is:

OutCol1:decimal[10]=decimal_from_string(InCol1)

A different question to everyone. To convert from string to integer, it seems like I have to do 2 modify stages, one to convert to decimal from string and another to convert to integer from decimal. Does anybody have any other way?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Add one more Specification to the Modify stage, containing the single token NOWARN.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
splayer
Charter Member
Charter Member
Posts: 502
Joined: Mon Apr 12, 2004 5:01 pm

Post by splayer »

Ray, thank you for your response. I added another specification as:
Specification=NOWARN

This does not suppress the warning on the sequential file. It remains.

Also, do you have an idea about the other question of 2 modify stages?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Since you already have a Transformer stage, you can use nested conversion functions there. Thereby you could avoid any need for your Modify stages.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
splayer
Charter Member
Charter Member
Posts: 502
Joined: Mon Apr 12, 2004 5:01 pm

Post by splayer »

Yea, I guess for my purposes, transformer is the best. It seems like Modify is much too convoluted to use. As usual, the documentation is terrible. Thanks for your responses.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Have you read the Orchestrate Operators manual? It's more comprehensive.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
uegodawa
Participant
Posts: 71
Joined: Thu Apr 27, 2006 12:46 pm

Post by uegodawa »

There are two ways to resolve this issue;

1. Change the length of your input data from 12 to 10

OR

2. Change the specification as follows;
OutCol1:decimal[12]=decimal_from_string(InCol1)
Make sure output column tab also has the same metadata decimal(12,0) for OutCol1.
Thanks,
Upul
Post Reply