Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Export BLOB from SQLite database

  1. #1
    Join Date
    Oct 2015
    Posts
    2

    Default Export BLOB from SQLite database

    Hi there I want to see whether I can use Pentaho for one of my applications! I use Spoon and I want to read a BLOB from an sqlite database file. I use the sqlite-jdbc-3.8.11.2 driver from Xerial. It works fine for other table fields, but not for a blob.
    I receive the following error:

    org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMetaMod@9cfee5 - ERROR (version 5.0.1-stable, build 1 from 2013-11-15_16-08-58 by buildguy) : Unable to get fields from previous steps because of an error

    I use a table input to fetch the data
    Any ideas are welcome

    Thanks!

  2. #2
    Join Date
    Oct 2015
    Posts
    2

    Default

    So I still haven't found an answer on why it doesn't work but I have found a workaround.
    I modified the query so that it gives the blob in hex.

    E.g. SELECT hex(data) FROM content

    The length of the hex output can be big. Then the calculator step could be used with using the 'Hex decode of string A'.

    Another way would be to use the SELECT cast(data as TEXT) FROM content. I have to check which one I could use so that the data is not currupt.

  3. #3
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    So long, and thanks for all the fish.

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.