Hitachi Vantara Pentaho Community Forums
Results 1 to 8 of 8

Thread: Field not valid in the context it is used?

  1. #1
    Join Date
    Jun 2009
    Posts
    3

    Default Field not valid in the context it is used?

    I don't understand what the problem is. I have the field defined the same way as the field in the table i am trying to put the data into. Every time I run transform I get this error on the first row being moved into the table. It has been driving me crazy for days and i have tried starting new files and still run into the same problem.

    Someone please help!

  2. #2
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    There isn't enough info here for anyone to try to work with.

    http://forums.pentaho.org/showthread.php?t=71633

    That will help you give the community enough to work with.

  3. #3
    Join Date
    May 2006
    Posts
    4,882

    Default

    And now for
    - An example transformation
    - The complete log file you get

    Regards,
    Sven

  4. #4
    Join Date
    Jun 2009
    Posts
    3

    Default

    I'm sorry for not posting the error message.
    Here is the error I am getting:

    2009/08/17 14:31:03 - Table output 2.0 - Prepared statement : INSERT INTO CONTACTS (IDNumber, Address, City, "STATE", Zip, HomePhone, MobilePhone, Pager, Next_of_kin, Next_of_kin_number, "TYPE 2") VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
    2009/08/17 14:31:03 - Excel Input.0 - Unknown type : Empty : []
    2009/08/17 14:31:03 - Excel Input.0 - Unknown type : Empty : []
    2009/08/17 14:31:03 - Excel Input.0 - Unknown type : Empty : []
    2009/08/17 14:31:03 - Excel Input.0 - Unknown type : Empty : []
    2009/08/17 14:31:03 - Excel Input.0 - Unknown type : Empty : []
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : Because of an error, this step can't continue:
    2009/08/17 14:31:03 - Excel Input.0 - Unknown type : Empty : []
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : org.pentaho.di.core.exception.KettleException:
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : Error inserting row into table [CONTACTS] with values: [ 39214], [2717 E 28TH ST APT 3A], [BROOKLYN], [N.Y.], [ 11235.0], [718-648-4014], [null], [null], [null], [null], [Emergency]
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) :
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : Error inserting/updating row
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : [IBM][CLI Driver][DB2/LINUXX8664] SQL0206N "IDNUMBER" is not valid in the context where it is used. SQLSTATE=42703
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) :
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) :
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at org.pentaho.di.trans.steps.tableoutput.TableOutput.writeToTable(TableOutput.java:422)
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at org.pentaho.di.trans.steps.tableoutput.TableOutput.processRow(TableOutput.java:114)
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at org.pentaho.di.trans.step.BaseStep.runStepThread(BaseStep.java:2889)
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at org.pentaho.di.trans.steps.tableoutput.TableOutput.run(TableOutput.java:680)
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : Caused by: org.pentaho.di.core.exception.KettleDatabaseException:
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : Error inserting/updating row
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : [IBM][CLI Driver][DB2/LINUXX8664] SQL0206N "IDNUMBER" is not valid in the context where it is used. SQLSTATE=42703
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) :
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at org.pentaho.di.core.database.Database.insertRow(Database.java:1325)
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at org.pentaho.di.trans.steps.tableoutput.TableOutput.writeToTable(TableOutput.java:270)
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : ... 3 more
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : Caused by: java.sql.SQLException: [IBM][CLI Driver][DB2/LINUXX8664] SQL0206N "IDNUMBER" is not valid in the context where it is used. SQLSTATE=42703
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at sun.jdbc.odbc.JdbcOdbc.SQLExecute(Unknown Source)
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at sun.jdbc.odbc.JdbcOdbcPreparedStatement.execute(Unknown Source)
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeUpdate(Unknown Source)
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at org.pentaho.di.core.database.Database.insertRow(Database.java:1274)
    2009/08/17 14:31:03 - Table output.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : ... 4 more
    2009/08/17 14:31:03 - If field value is null.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
    2009/08/17 14:31:03 - Excel Input.0 - Unknown type : Empty : []
    2009/08/17 14:31:03 - Select values.0 - Finished processing (I=0, O=0, R=1, W=2, U=0, E=0)
    2009/08/17 14:31:03 - Excel Input.0 - Finished processing (I=0, O=0, R=0, W=22, U=0, E=0)
    2009/08/17 14:31:03 - IRSJVV - Connection to database closed!
    2009/08/17 14:31:03 - Table output.0 - Finished processing (I=0, O=0, R=1, W=0, U=0, E=1)
    2009/08/17 14:31:03 - 2009-04-08-All_2 - Transformation detected one or more steps with errors.
    2009/08/17 14:31:03 - 2009-04-08-All_2 - Transformation is killing the other steps!
    2009/08/17 14:31:04 - MSHAW - Connection to database closed!
    2009/08/17 14:31:04 - Table output 2.0 - Finished processing (I=0, O=1, R=1, W=0, U=0, E=0)
    2009/08/17 14:31:04 - Spoon - The transformation has finished!!
    2009/08/17 14:31:04 - 2009-04-08-All_2 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : Errors detected!
    2009/08/17 14:58:03 - IRSJVV - New database connection defined
    2009/08/17 14:58:03 - IRSJVV - Connected to database.
    2009/08/17 15:13:45 - IRSJVV - New database connection defined
    2009/08/17 15:13:46 - IRSJVV - Connected to database.
    2009/08/17 15:13:51 - IRSJVV - New database connection defined
    2009/08/17 15:13:51 - IRSJVV - Connected to database.
    2009/08/17 15:14:14 - IRSJVV - New database connection defined
    2009/08/17 15:14:14 - IRSJVV - Connected to database.
    2009/08/17 15:16:46 - IRSJVV - New database connection defined
    2009/08/17 15:16:46 - IRSJVV - Connected to database.

  5. #5
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Do you have sample data (Since you are reading from Excel, a copy of the XLS), the transform, and the DDL (Table Definition) that you can post?

    It seems to be the database itself, rather than Kettle that is complaining.

  6. #6

    Default

    I would say some king of DB2 bug (lowercase column names)
    IDNumber vs IDNUMBER ... ouch


    http://support.dynamicai.com/forum/v...26758950a2d5a6

    Samatar
    Samatar

  7. #7
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Given that, perhaps turning on the Quote all Identifiers option, or the "Force All to Uppercase" option might work...

  8. #8
    Join Date
    Jun 2009
    Posts
    3

    Default

    Sorry I couldn't get back to the thread earlier, I was working off site yesterday. I wish I could post a sample file but I can't because the files contain inmate information.

    I tried capitalizing the field names and I still get the same error.

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.