Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Couldn't get field info from [SELECT * FROM products LIMIT 0]

  1. #1
    Join Date
    Nov 2015
    Posts
    6

    Default Couldn't get field info from [SELECT * FROM products LIMIT 0]

    Hi, I have pentaho CE 8.1 with MySQL...I'm doing the tutorial from "Pentaho Data Integration - Beginners' Guide", chap 8 inserting new products or updating existing ones


    In the Insert/Update step
    At the moment of configuring the step and setting the fields to map, when clicking on "edit mapping" I've got the following error:
    Couldn't get field info from [SELECT * FROM products LIMIT 0]
    Error determining value metadata from SQL resultset metadata
    Unknown system variable 'OPTION'

    and asking for details I've got the log:
    ==============================

    org.pentaho.di.core.exception.KettleException:
    Unable to determine the required fields.


    Couldn't get field info from [SELECT * FROM products LIMIT 0]




    Error determining value metadata from SQL resultset metadata
    Unknown system variable 'OPTION'






    at org.pentaho.di.trans.steps.insertupdate.InsertUpdateMeta.getRequiredFields(InsertUpdateMeta.java:881)
    at org.pentaho.di.ui.trans.steps.insertupdate.InsertUpdateDialog.generateMappings(InsertUpdateDialog.java:558)
    at org.pentaho.di.ui.trans.steps.insertupdate.InsertUpdateDialog.access$200(InsertUpdateDialog.java:82)
    at org.pentaho.di.ui.trans.steps.insertupdate.InsertUpdateDialog$4.handleEvent(InsertUpdateDialog.java:400)
    at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Display.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    at org.pentaho.di.ui.trans.steps.insertupdate.InsertUpdateDialog.open(InsertUpdateDialog.java:507)
    at org.pentaho.di.ui.spoon.delegates.SpoonStepsDelegate.editStep(SpoonStepsDelegate.java:120)
    at org.pentaho.di.ui.spoon.Spoon.editStep(Spoon.java:8949)
    at org.pentaho.di.ui.spoon.trans.TransGraph.editStep(TransGraph.java:3291)
    at org.pentaho.di.ui.spoon.trans.TransGraph.mouseDoubleClick(TransGraph.java:785)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
    at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Display.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1375)
    at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:8104)
    at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:9466)
    at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:701)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.pentaho.commons.launcher.Launcher.main(Launcher.java:92)
    Caused by: org.pentaho.di.core.exception.KettleDatabaseException:
    Couldn't get field info from [SELECT * FROM products LIMIT 0]




    Error determining value metadata from SQL resultset metadata
    Unknown system variable 'OPTION'




    at org.pentaho.di.core.database.Database.getQueryFieldsFallback(Database.java:2354)
    at org.pentaho.di.core.database.Database.getQueryFields(Database.java:2193)
    at org.pentaho.di.core.database.Database.getQueryFields(Database.java:1847)
    at org.pentaho.di.core.database.Database.getTableFields(Database.java:1843)
    at org.pentaho.di.trans.steps.insertupdate.InsertUpdateMeta.getRequiredFields(InsertUpdateMeta.java:872)
    ... 28 more
    Caused by: org.pentaho.di.core.exception.KettleDatabaseException:
    Error determining value metadata from SQL resultset metadata
    Unknown system variable 'OPTION'


    at org.pentaho.di.core.row.value.ValueMetaBase.getValueFromSQLType(ValueMetaBase.java:4881)
    at org.pentaho.di.core.database.Database.getValueFromSQLType(Database.java:2439)
    at org.pentaho.di.core.database.Database.getRowInfo(Database.java:2400)
    at org.pentaho.di.core.database.Database.getQueryFieldsFallback(Database.java:2345)
    ... 32 more
    Caused by: java.sql.SQLException: Unknown system variable 'OPTION'
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2619)
    at com.mysql.jdbc.StatementImpl.executeSimpleNonQuery(StatementImpl.java:1606)
    at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1503)
    at com.mysql.jdbc.ConnectionImpl.getMaxBytesPerChar(ConnectionImpl.java:3003)
    at com.mysql.jdbc.Field.getMaxBytesPerCharacter(Field.java:602)
    at com.mysql.jdbc.ResultSetMetaData.getColumnDisplaySize(ResultSetMetaData.java:213)
    at org.pentaho.di.core.row.value.ValueMetaBase.getValueFromSQLType(ValueMetaBase.java:4657)
    ... 35 more


    ==============================

    I finished entering the transformation and run with the same result (error).

    Any idea to solve it ? as I have not found the same problem

    Thanks

  2. #2

    Default

    Which version of the MySQL JDBC connector are you using in PDI?

  3. #3
    Join Date
    Nov 2015
    Posts
    6

    Default

    Thanks for answer...I'm using mysql-connector-java-5.1.17 as the JDBC connector

  4. #4
    Join Date
    Nov 2015
    Posts
    6

    Default

    Hello again...since you ask about the connector version...I looked for other files and trial-and-error...the mysql-connector-java-5.1.46 worked fine...and I also have the pentaho CE I put the file in all the libs applicable directories.
    Thanks

  5. #5

    Default

    I wish I had a reference link to provide here, but I came across a similar issue a couple years ago, and traced it back to an incompatibility between certain MySQL Server and Connector/J versions. If I remember correctly, I think we were using a recent (5.1.17 or below) version of Connector/J against a MySQL 5.0 server. Thankfully, we finally were able to upgrade everything and get off of MySQL 5.0.

    Glad to hear that the newer version of the JDBC driver is working for you.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.