Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Convert Binary Data from Cassandra DB to String/Int

  1. #1
    Join Date
    Apr 2014
    Posts
    1

    Default Convert Binary Data from Cassandra DB to String/Int

    Hello. I am using Cassandra Input as the input in the Kettle. I have defined the required connections etc in the input.

    For output, in the column value I am getting the value as Binary (Machine Character). The value is stored in Cassandra from application end using ObjectSerializer.Hence the column value is always Binary.

    I need to convert this binary value to string/int, once I have the value from the execution of CQL.

    I used the Modified Java Script step after the Cassandra Input and used.

    var msg=new java.lang.String(columnValue,"UTF-8");

    But, the output column "msg" prints machine character.

    Is there any way, I can convert the binary data to different data type such as string/int etc.

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

    Default

    What exactly is the content of such a binary msg - can you give an example?
    As you hope to treat it as an UTF-8 string I would expect mostly printable characters interspersed with some ASCII controls (HT, CR, LF, ...).
    Can you show the output that is worrying you?
    So long, and thanks for all the fish.

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.