Writing the WVARCHAR column into a VARCHAR database column

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
ujala
Participant
Posts: 45
Joined: Mon Jun 21, 2010 2:51 pm
Location: Chennai

Writing the WVARCHAR column into a VARCHAR database column

Post by ujala »

Hi all,
I have job that extracts data from DB2 and loads into MySQL using IBM Data Direct ODBC Driver.After successful completion of the job,I got the following error message:
"Writing the WVARCHAR column into a VARCHAR database column can cause data loss or corruption due to character set conversions.".

I strongly feel problem is with the table creation,
I tried using UTF8 but the same problem persists.

So Please let me know any solution for the above issue.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Convert from ustring to string within your DataStage job, using either a Modify stage or a Transformer stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ujala
Participant
Posts: 45
Joined: Mon Jun 21, 2010 2:51 pm
Location: Chennai

warning across all jobs

Post by ujala »

This issue persists with respect to environment and persists across all the jobs in different environment,
I tested in local environment it works fine.
But in client environment it throws the above warning

Locally i faced this issue but was solved by appending utf 8 to create table, but the same does not work in client side.

Tried removing that too, but same result
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Did you follow Ray's suggestion. I haven't been to a site yet where this approach didn't work.
ujala
Participant
Posts: 45
Joined: Mon Jun 21, 2010 2:51 pm
Location: Chennai

Post by ujala »

That will work but my concern is to get it done through table creation such that there will no modification required in all the jobs.

so u mean to say that we will not be able to do through table creation scripts
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I haven't looked into the database DDL scripts, but if you keep all of your databases in the same character set plus do the same for DataStage then no conversion will be necessary and correspondingly no warnings will be produced.
ujala
Participant
Posts: 45
Joined: Mon Jun 21, 2010 2:51 pm
Location: Chennai

Post by ujala »

Hi all,
I developed a job that extract the data from source and loads into target without any transformation logic.But i used RCP in my job.After successful completion,I got the following warning message
"Writing the WVARCHAR column into a VARCHAR database column can cause data loss or corruption due to character set conversions.".How to solve this warning
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

In this case you ARE converting from WVarChar to VarChar, and since you are doing a generic job using RCP you cannot get rid of the message. But you can deprecate the warning message to an informational one either at a job level or at a project level using the DataStage message handlers.
haylo75
Premium Member
Premium Member
Posts: 15
Joined: Fri Jul 27, 2012 8:44 am

Post by haylo75 »

I ran across the same issue, and tried conversion in a Transformer using UStringToString to no avail. I then realized that column metadata captured in my source data had the column in question declared as VarChar(10) non-Unicode. Adding Unicode to the Extended Properties for the offending column fixed it for me.
The middle of every successful project looks like a disaster -- Rosabeth Moss Cantor
battaliou
Participant
Posts: 155
Joined: Mon Feb 24, 2003 7:28 am
Location: London
Contact:

Post by battaliou »

We had a similar problem recently using ODBC connector against i-series non-journalised tables. The fix here was to set ODBC setting 'Isolation level' to Default.
3NF: Every non-key attribute must provide a fact about the key, the whole key, and nothing but the key. So help me Codd.
Post Reply