Netezza JDBC Error – Unterminated quoted string

The ‘Unterminated quoted string’ error occurs from time to time when working with the InfoSphere DataStage Netezza JDBC Connector stage and is nebulas, at best.  However, the solution is, normally, straight forward enough once you understand it.  Usually, this error is the result of target table fields or field being shorter than the input data.  The fix is, normally, to compare you input field lengths (or composite field length, if consolidation fields into one field) and adjusting the field length higher.  In some cases, if business rules allow you may be able to substring or truncate the input data length (not a recommended approach), but information can be lost with this approach.


org.netezza.error.NzSQLException: ERROR:  Unterminated quoted string

Example Error Message


Tgt_IIS_Job_Dim,0: The connector encountered a Java exception:  org.netezza.error.NzSQLException: ERROR:  Unterminated quoted string    at org.netezza.internal.QueryExecutor.getNextResult(    at org.netezza.internal.QueryExecutor.execute(  at org.netezza.sql.NzConnection.execute(       at org.netezza.sql.NzStatement._execute(           at org.netezza.sql.NzPreparedStatament.executeUpdate(   at               at