Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: "Load file content in memory" step with binary files

  1. #1

    Default "Load file content in memory" step with binary files

    Hello,

    I'm trying to load a binary file (graphic file; .jpg, .png) with the "Load file content in memory" step followed by a custom plugin step, which takes the binary content and save that under a different name (just for the purpose to get used to the plugin step development). I had a rather simple .png file (graphic file with one background color) where it worked. The generate file is equal to the input file. With another .png file, about 350 KB in size, this doesn't work. I see that various HEX appearances like 81, 9D, 8D, 90, 8F where flipped to a HEX value of 3F in the generated file. The custom plugin step uses the getBinary method to receive the binary content from the data stream as Matt suggested. So, I wonder, if there is something wrong with the "Load file content in memory" step, not reading the input file correctly, or if there is something wrong using DataOutputStream.write via KettleVFS when writing a file.

    Weird!

    Any pointers are much appreciated.

    Thanks,
    Thomas

  2. #2

    Default

    Additionally, what I found out:

    If I create a transformation as described here: http://wiki.pentaho.com/display/COM/...ts+With+Kettle except that I replace the "Store in Table BLOB_TEST" with my custom plugin step for storing the byte array into a file, everything is fine. The source and the generated graphic file are identical, so it looks like the "Load file content in memory" step does something weird.

    HTH,
    Thomas

  3. #3
    Join Date
    Apr 2008
    Posts
    4,690

    Default

    File a JIRA case on it, and provide samples

    IE. Almost identical transforms: your working version that doesn't use the Load File in Memory and one that doesn't work but uses the Load File in Memory

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.