Page 1 of 1

Converting Number To String

Posted: Tue Feb 07, 2006 3:56 pm
by somu_june
Hi,

I need a help to over come warning message. I have a job when Iam running that job Iam getting a warning message

Surr_Key_Ann: When checking operator: When binding output interface field "AnnNumber" to field "AnnNumber": Implicit conversion from source type "int32" to result type "string[max=18]": Converting number to string.

what Iam doing in my job is Iam using a surrogate key stage to generate a key AnnNumber 32 bit integer and outputs AnnNumber to transformer stage input and converting to format like 'DMT':Annnumber to a varchar [18] so I am getting output like 'DMT1' from transformer.

can I use Modify stage to over come this problem. If I can use that Can any one tell me how to use modify stage.


Thanks,
Srinu

Posted: Wed Feb 08, 2006 1:52 am
by kcshankar
Hi somu_june,
When the target columns metadata does not match with the source's(In your case source "int32" to target "string[max=18]")and no explicit conversion has been made you will get this warning message.
DS does the number to string conversion and warns.
Try by changing your source data type as String and check.

regards
kcs

Posted: Wed Feb 08, 2006 3:30 am
by ray.wurlod
Have you looked at the chapter on the Modify stage in the Parallel Job Developer's Guide? Only beware that it has the wrong function for handling null (which won't affect your current issue).

Posted: Wed Feb 08, 2006 5:38 am
by kumar_s
Hi Srinu,

You have assinged the data type of AnnNumber in surrogate key as Varchar(18).
Rather assign it as integer and map it to varchar. Surrogate key can produce only the integer number. int32 can be implicitly convert to varchar in transformer. you can assign the expressio as 'DMT':Link.Annnumber which is ok to get it converted.

-Kumar

Posted: Wed Feb 08, 2006 8:33 am
by somu_june
Hi Kumar,


Thanks for your help in solving my problem.








Thanks,
somaraju