Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Type conversion error for sybase database from string to int

  1. #1

    Default Type conversion error for sybase database from string to int

    Hi All,

    I am facing one issue as below:

    I have one transformation which has Update step to update sybase table's column with INT datatype.

    Value coming from other step "User defined java expression" is of type String. So its failing with below exception:

    I think implicit type conversion, kettle is not performing for sybase and db2 databases.

    Code:
    2011/03/09 15:02:52 - Update.0 - ERROR (version 4.0.0-stable, build 13376 from 2010-06-15 11.00.26 by buildguy) : Error in step, asking everyone to stop because of:
    2011/03/09 15:02:52 - Update.0 - ERROR (version 4.0.0-stable, build 13376 from 2010-06-15 11.00.26 by buildguy) : org.pentaho.di.core.exception.KettleDatabaseException: 
    2011/03/09 15:02:52 - Update.0 - ERROR (version 4.0.0-stable, build 13376 from 2010-06-15 11.00.26 by buildguy) : Error inserting/updating row
    2011/03/09 15:02:52 - Update.0 - ERROR (version 4.0.0-stable, build 13376 from 2010-06-15 11.00.26 by buildguy) : Implicit conversion from datatype 'VARCHAR' to 'INT' is not allowed.  Use the CONVERT function to run this query.
    
    2011/03/09 15:02:52 - Update.0 - ERROR (version 4.0.0-stable, build 13376 from 2010-06-15 11.00.26 by buildguy) : org.pentaho.di.core.database.Database.insertRow(Database.java:1381)
    2011/03/09 15:02:52 - Update.0 - ERROR (version 4.0.0-stable, build 13376 from 2010-06-15 11.00.26 by buildguy) : org.pentaho.di.core.database.Database.insertRow(Database.java:1295)
    2011/03/09 15:02:52 - Update.0 - ERROR (version 4.0.0-stable, build 13376 from 2010-06-15 11.00.26 by buildguy) : org.pentaho.di.core.database.Database.insertRow(Database.java:1283)
    2011/03/09 15:02:52 - Update.0 - ERROR (version 4.0.0-stable, build 13376 from 2010-06-15 11.00.26 by buildguy) : org.pentaho.di.trans.steps.update.Update.lookupValues(Update.java:181)
    2011/03/09 15:02:52 - Update.0 - ERROR (version 4.0.0-stable, build 13376 from 2010-06-15 11.00.26 by buildguy) : org.pentaho.di.trans.steps.update.Update.processRow(Update.java:291)
    2011/03/09 15:02:52 - Update.0 - ERROR (version 4.0.0-stable, build 13376 from 2010-06-15 11.00.26 by buildguy) : org.pentaho.di.trans.step.RunThread.run(RunThread.java:40)
    2011/03/09 15:02:52 - Update.0 - ERROR (version 4.0.0-stable, build 13376 from 2010-06-15 11.00.26 by buildguy) : java.lang.Thread.run(Unknown Source)
    Last edited by pdshelke; 03-09-2011 at 05:38 AM.
    Prashant D Shelke.

  2. #2
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    What makes you think Kettle magically converts the data to int while doing the update? You ask for a String to be passed and that's what Kettle does.

  3. #3

    Default

    Ok , other way around I need to ask for how to take care of explicit datatype conversions in kettle?
    Prashant D Shelke.

  4. #4
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    With a "Select Values" step. Go to the Metadata tab.

  5. #5

    Default

    I resolved this issue using the same way already. Thanks for reply.
    Prashant D Shelke.

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.