<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Morphlines - converting a byte array field to a UTF-8 string in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Morphlines-converting-a-byte-array-field-to-a-UTF-8-string/m-p/19562#M3127</link>
    <description>&lt;P&gt;Perfect, thanks for this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was also having a look at something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{ setValues { _attachment_body : "@{myInputField}" } }
{ readClob { charSet : "UTF-8" } }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Out of interest, are there any disadvantages with that approach?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Sep 2014 20:19:41 GMT</pubDate>
    <dc:creator>hadooptom</dc:creator>
    <dc:date>2014-09-30T20:19:41Z</dc:date>
    <item>
      <title>Morphlines - converting a byte array field to a UTF-8 string</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Morphlines-converting-a-byte-array-field-to-a-UTF-8-string/m-p/19536#M3125</link>
      <description>&lt;P&gt;I've got a record in Morphlines that includes a byte array field. &amp;nbsp;I want to convert that to a UTF-8 string, i.e. the equivalent of String(field, "UTF-8) in Java.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can see the readClob command exists, but that works on a whole record rather than a single field. &amp;nbsp;Is there an alternative?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate that I should&amp;nbsp;have stored my data differently, but it's not my format and that's what ETL tools (morphlines) are for! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2014 13:51:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Morphlines-converting-a-byte-array-field-to-a-UTF-8-string/m-p/19536#M3125</guid>
      <dc:creator>hadooptom</dc:creator>
      <dc:date>2014-09-30T13:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: Morphlines - converting a byte array field to a UTF-8 string</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Morphlines-converting-a-byte-array-field-to-a-UTF-8-string/m-p/19556#M3126</link>
      <description>You can try the java command, like so:&lt;BR /&gt;&lt;BR /&gt;java {&lt;BR /&gt;code: """&lt;BR /&gt;String str = new String((byte[]) record.getFirstValue("myInputField"), "UTF-8");&lt;BR /&gt;record.put("myOutputField", str);&lt;BR /&gt;return getChild().process(record); // pass record to next command in chain&lt;BR /&gt;"""&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Wolfgang.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Sep 2014 18:42:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Morphlines-converting-a-byte-array-field-to-a-UTF-8-string/m-p/19556#M3126</guid>
      <dc:creator>whosch</dc:creator>
      <dc:date>2014-09-30T18:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Morphlines - converting a byte array field to a UTF-8 string</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Morphlines-converting-a-byte-array-field-to-a-UTF-8-string/m-p/19562#M3127</link>
      <description>&lt;P&gt;Perfect, thanks for this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was also having a look at something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{ setValues { _attachment_body : "@{myInputField}" } }
{ readClob { charSet : "UTF-8" } }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Out of interest, are there any disadvantages with that approach?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2014 20:19:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Morphlines-converting-a-byte-array-field-to-a-UTF-8-string/m-p/19562#M3127</guid>
      <dc:creator>hadooptom</dc:creator>
      <dc:date>2014-09-30T20:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Morphlines - converting a byte array field to a UTF-8 string</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Morphlines-converting-a-byte-array-field-to-a-UTF-8-string/m-p/19564#M3128</link>
      <description>That would work fine as well.&lt;BR /&gt;&lt;BR /&gt;Wolfgang.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Sep 2014 20:37:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Morphlines-converting-a-byte-array-field-to-a-UTF-8-string/m-p/19564#M3128</guid>
      <dc:creator>whosch</dc:creator>
      <dc:date>2014-09-30T20:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Morphlines - converting a byte array field to a UTF-8 string</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Morphlines-converting-a-byte-array-field-to-a-UTF-8-string/m-p/20568#M3129</link>
      <description>&lt;P&gt;Hi, what kind of source you use to get attachment_body? Is it possible to use HttpSource as a source and morphlinesolrsink to process accepted payload (xml data)&lt;/P&gt;</description>
      <pubDate>Mon, 20 Oct 2014 23:04:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Morphlines-converting-a-byte-array-field-to-a-UTF-8-string/m-p/20568#M3129</guid>
      <dc:creator>sergey.sheypak566881637</dc:creator>
      <dc:date>2014-10-20T23:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: Morphlines - converting a byte array field to a UTF-8 string</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Morphlines-converting-a-byte-array-field-to-a-UTF-8-string/m-p/69921#M3130</link>
      <description>&lt;P&gt;While reading parquet file, How to convert Parquet DECIMAL datatype to String.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jul 2018 06:07:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Morphlines-converting-a-byte-array-field-to-a-UTF-8-string/m-p/69921#M3130</guid>
      <dc:creator>PoojaK</dc:creator>
      <dc:date>2018-07-12T06:07:16Z</dc:date>
    </item>
  </channel>
</rss>

