Page 1 of 1

WARNING:Implicit conversion from source type to result type

Posted: Wed Nov 25, 2009 11:35 pm
by deepa_shenoy
Hi,

I am getting this warning while using the Change Data Capture Stage:

CHCP_GL: When checking operator: When binding output schema variable "outputRec": When binding output interface field "source_code" to field "source_code": Implicit conversion from source type "ustring[5]" to result type "string[max=5]": Converting ustring to string using codepage ISO-8859-1.

What do I do to remove this warning. Its coming for all the columns.

Thanks in advance.

Regards,
Deepa

Posted: Wed Nov 25, 2009 11:51 pm
by ray.wurlod
Be consistent with your use of the extended property Unicode on your strings.

Posted: Mon Nov 30, 2009 11:46 am
by deepa_shenoy
Hi All,

Sorry for re-opening this topic.

I am getting these warnings:

When checking operator: When binding output interface field "AR_ADDRESS3" to field "AR_ADDRESS3": Implicit conversion from source type "ustring[max=50]"to result type "string".
When checking operator: When binding output interface field "AR_ADDRESS3" to field "AR_ADDRESS3": Conversion from source type "string" to result type "ustring[max=50]": Possible truncation of variable length string.

I have removed Unicode from the source metadata as well target metadata. I have tried giving the following at both source and target:
1. Varchar (same lengths)
2. NVarchar (same lengths)
3. Varchar + Unicode
4. NVarchar (different lengths as it said "Possible truncation")

My source is SQL Server, so I am using an ODBC Stage and my Target is a Sequential File, through a Copy Stage.

Unicode values are present in the data. How do I resolve this issue?

Thanks in advance.

Regards,
Deepa

Posted: Mon Nov 30, 2009 2:25 pm
by Kryt0n
If Unicode values are present in your data, why have you removed Unicode?

Your type definitions need to be the same in all three stages

Posted: Mon Nov 30, 2009 3:46 pm
by ray.wurlod
Your string type, wherever it is, is unbounded. You will therefore always get these alert messages.

Posted: Mon Nov 30, 2009 9:48 pm
by deepa_shenoy
Is there any solution for the alert messages to stop coming?

I have given Varchar + Unicode. No difference at all.

Posted: Mon Nov 30, 2009 9:54 pm
by ray.wurlod
Give VarChar(50) - that is, data type VarChar and precision 50.

Standardize whether you have Unicode or don't have Unicode.

Posted: Mon Nov 30, 2009 10:19 pm
by deepa_shenoy
I did not want to use unicode anywhere so I removed it while importing itself. But this particular column still showed Varchar(Unicode) as its SQL type. Hence, I manually removed it. None of the columns have unicode now.

In the source(SQL Server) the datatype is 'Nvarchar'.

The datatype and length given in Datastage in all the stages is Varchar 50.

The warning still persists.

Posted: Mon Nov 30, 2009 10:31 pm
by ray.wurlod
NVarChar is Unicode. Use Unicode consitently throughout, and always specify a string length. You may need to make the sizes a multiple of the number of characters.

Posted: Tue Dec 01, 2009 11:00 pm
by deepa_shenoy
I gave NVarchar and increased the size to 5000.
The error still comes.

ODBC_Contract: When checking operator: When binding output interface field "AR_ADDRESS3" to field "AR_ADDRESS3": Implicit conversion from source type "ustring[max=50]"to result type "string".

This is at the source ODBC stage itself.

Posted: Tue Dec 01, 2009 11:02 pm
by ray.wurlod
Exactly the same error, referring to a length of 5? If so, you've missed one - or are looking at the wrong log.

Posted: Tue Dec 01, 2009 11:06 pm
by deepa_shenoy
There are three columns which throw this warning. Currently, I have created a new job and selected only those three columns and trying all kinds of permutation and combination to get rid of the error.

Posted: Wed Dec 02, 2009 2:17 am
by ray.wurlod
Please re-read my question. Then answer it. Or at the very least try to think about what I'm driving at.