Ask Your Question

JDBC Producer - unable to load special characters in Oracle table properly

asked 2020-07-27 08:11:06 -0600

Sonu gravatar image

updated 2020-07-27 08:12:11 -0600


We have 2 Oracle Tables TableA and TableB in the same database & schema and of same structure.

For a smaller section of our POC we need to move data from TableA to TableB using Streamsets JDBC Query consumenr & JDBC Producer.

The problem here is that Table A has some special characters in Column1 and the data isn't getting loaded properly from TableA.column1 to TableB.Column1.

Source and Target data after insertion look like the attached image.

I have also attached the image of data preview in streamsets which is correct.

Can you please help on this.

Thank You !!image description

edit retag flag offensive close merge delete


Unable to add images here. I have also asked same question on google groups which has attachments.!topic/sdc-user/g99ewcMA25g

Sonu gravatar imageSonu ( 2020-07-27 08:18:27 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-10-22 17:30:59 -0600

zac gravatar image

The fix for this issue is to set an Additional JDBC Configuration Property for the Oracle driver so that it treats all strings as international characters.

oracle.jdbc.defaultNChar = true

NCHAR, NVARCHAR2, NCLOB and the defaultNChar Property By default, oracle.jdbc.OraclePreparedStatement treats all columns as CHAR. To insert Java strings into NCHAR, NVARCHAR2, and NCLOB columns, developers had to invoke setFormOfUse() on each national-language column. At this release, if you set the system property oracle.jdbc.defaultNChar to true, JDBC treats all character columns as being national-language. The default value for defaultNChar is false.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-07-27 08:11:06 -0600

Seen: 201 times

Last updated: Oct 22