Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

JavaRow to MySQLOutput "newColumn" error?

I am trying to load a file into a MySQL DB. I succesfully load the file and use a tJavaRow module to parse and enhance the data. The output of this function looks good when I use tLogRow to show me the output. I then replace the tLogRow with a tMySqlOutput, sync up the column names (I made sure the names are identical to the DB column names) and hit run. I then get
Exception in component tMysqlOutput_1
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'newColumn' in 'field list'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:353)
at com.mysql.jdbc.Util.getInstance(Util.java:336)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1031)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2938)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1601)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1710)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2436)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1402)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1694)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1608)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1593)
at control_1.z_development.Z_Development.tFileList_1Process(Z_Development.java:1525)
at control_1.z_development.Z_Development.runJob(Z_Development.java:1707)
at control_1.z_development.Z_Development.main(Z_Development.java:1651)
Job Z_Development ended at 11:22 15/11/2007.
Looking at the code I found a line that looks like this
pstmt_tMysqlOutput_1 = conn_tMysqlOutput_1
.prepareStatement("INSERT INTO `"
+ "sdf_acrm_log"
+ "` (`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn`,`newColumn1`,`newColumn2`,`newColumn3`,`newColumn4`,`newColumn`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");

Why is this so?
Labels (5)
1 Reply
Anonymous
Not applicable
Author

Hi
In your schema of tMysqlOutput component, there is a 'Db Column' field, you should set the column name as the same column which you define in your database.
Best regards
shong