Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: setValue() function in UDJC - error

  1. #1
    Join Date
    Mar 2014
    Posts
    4

    Default setValue() function in UDJC - error

    I'm using kettle in a very basic way. What I want to do is read from csv file, do some kind of transformation in User Defined Java Class step and write output to a text file.
    Here is the picture:
    Name:  Capture.PNG
Views: 49
Size:  9.3 KB

    When I run this I essentially get this error on the last step:

    Code:
    value Integer<binary-string> : There was a data type error: the data type of java.lang.Long object [100] does not correspond to value meta [Integer<binary-string>]


    This is the line in UDJC step that seems to make the problem (field "value" is of Integer type):
    Code:
    get(Fields.Out, "value").setValue(out_row,new Long(100));


    When I remove that line, it works fine.
    Any idea how to fix this?


    This is how UDJC step looks like:
    Name:  Capture2.jpg
Views: 59
Size:  30.5 KB

  2. #2
    Join Date
    Apr 2012
    Posts
    6

    Default

    What Kettle version do you use?
    Could you please attach the transformation ?

  3. #3
    Join Date
    Mar 2014
    Posts
    4

    Default

    I've solved it! It was because lazy conversion option in "CSV file input" step was checked.

    Btw,the version is 4.4.

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.