Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: load binary data to table

  1. #1
    Join Date
    Feb 2011
    Posts
    152

    Default load binary data to table

    I'm trying to load 70,000 picture files to a database table in postresql. I found this page https://wiki.pentaho.com/display/COM...ts+With+Kettle
    but get an error in the javascript step:

    Cannot call property createByteArray in object [JavaPackage be.ibridge.kettle.core.Const]. It is not a function, it is "object". (script#4)

    Since I am not a java coder, I have no idea how to solve this. Anyone know what I need to change?

  2. #2
    Join Date
    Aug 2016
    Posts
    290

    Default

    Are you talking about java or javascript here?

  3. #3
    Join Date
    Nov 2009
    Posts
    688

    Default

    You have to change the line var content = Packages.be.ibridge.kettle.core.Const.createByteArray(file.length()); to var content = Packages.org.pentaho.di.core.Const.createByteArray(file.length());

  4. #4
    Join Date
    Feb 2011
    Posts
    152

    Default

    Thanks. I will try that tonight and let you know.

  5. #5
    Join Date
    Feb 2011
    Posts
    152

    Default

    That seems to have worked! My next question is how do I read it back out and write it to a jpg image file? Do I use text file output and just specify the binary field is the only thing to write to the file?
    Last edited by dnrickner; 12-17-2018 at 07:00 PM.

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.