Page 1 of 1

Interesting warning error before modify stage!

Posted: Wed Feb 20, 2008 12:15 pm
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.

Posted: Wed Feb 20, 2008 2:12 pm
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.

Posted: Wed Feb 20, 2008 2:24 pm
by lstsaur
Un-check your RCP, then warning messages will be gone.

Posted: Wed Feb 20, 2008 2:37 pm
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.

Posted: Wed Feb 20, 2008 2:56 pm
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.

Posted: Wed Feb 20, 2008 2:58 pm
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.

Posted: Wed Feb 20, 2008 3:12 pm
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.

Posted: Wed Feb 20, 2008 3:17 pm
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 ?

Posted: Wed Feb 20, 2008 4:18 pm
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?

Posted: Wed Feb 20, 2008 4:44 pm
by ray.wurlod
Add one more Specification to the Modify stage, containing the single token NOWARN.

Posted: Wed Feb 20, 2008 4:55 pm
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?

Posted: Wed Feb 20, 2008 8:48 pm
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.

Posted: Thu Feb 21, 2008 10:23 am
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.

Posted: Thu Feb 21, 2008 3:28 pm
by ray.wurlod
Have you read the Orchestrate Operators manual? It's more comprehensive.

Posted: Fri Feb 22, 2008 10:16 am
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.