<?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 How to read hexadecimal escape sequences from Spark using shc connector. in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-read-hexadecimal-escape-sequences-from-Spark-using/m-p/390055#M247167</link>
    <description>&lt;P&gt;In HBase, i have a column qualifier in which i have a data like below:&lt;/P&gt;&lt;P&gt;ReportV10\x00\x00\x00\x00\x02\x02\x02&lt;/P&gt;&lt;P&gt;When i am reading this table from spark using shc connect, i am getting junk characters in result. Below is the piece of code i am using to read a HBase table:&lt;/P&gt;&lt;P&gt;catalog='''{&lt;BR /&gt;"table":{"namespace":"db1","name":"tb1"},&lt;BR /&gt;"rowkey":"key",&lt;BR /&gt;"columns":{&lt;BR /&gt;"rowkey":{"cf":"rowkey","col":"key","type":"string"},&lt;BR /&gt;"nf_hh0":{"cf":"nf","col":"hh0","type":"string"}&lt;BR /&gt;}&lt;BR /&gt;}'''&lt;BR /&gt;df=spark.read.option("catalog",catalog).format("org.apache.spark.sql.execution.datasources.hbase").load()&lt;/P&gt;&lt;P&gt;df.show(1,False)&lt;/P&gt;&lt;P&gt;+------------------------------------------------+&lt;BR /&gt;| rowkey&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | nf_hh0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp;&lt;BR /&gt;+---------------------------+------------------- +&lt;BR /&gt;|26273707950926220...|ReportV10��&amp;nbsp; &amp;nbsp;|&lt;BR /&gt;+---------------------------+--------------------+&lt;/P&gt;&lt;P&gt;Spark version:&amp;nbsp;2.3.2.3.1.0.319-3&lt;/P&gt;&lt;P&gt;HBase version:&amp;nbsp;2.0.2.3.1.0.319-3&lt;/P&gt;&lt;P&gt;Python version: 2.7.5&lt;/P&gt;&lt;P&gt;Question: Is there any way to read those hexadecimal escape sequences as it is in a dataframe.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Apr 2026 06:28:54 GMT</pubDate>
    <dc:creator>ayukus0705</dc:creator>
    <dc:date>2026-04-21T06:28:54Z</dc:date>
    <item>
      <title>How to read hexadecimal escape sequences from Spark using shc connector.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-read-hexadecimal-escape-sequences-from-Spark-using/m-p/390055#M247167</link>
      <description>&lt;P&gt;In HBase, i have a column qualifier in which i have a data like below:&lt;/P&gt;&lt;P&gt;ReportV10\x00\x00\x00\x00\x02\x02\x02&lt;/P&gt;&lt;P&gt;When i am reading this table from spark using shc connect, i am getting junk characters in result. Below is the piece of code i am using to read a HBase table:&lt;/P&gt;&lt;P&gt;catalog='''{&lt;BR /&gt;"table":{"namespace":"db1","name":"tb1"},&lt;BR /&gt;"rowkey":"key",&lt;BR /&gt;"columns":{&lt;BR /&gt;"rowkey":{"cf":"rowkey","col":"key","type":"string"},&lt;BR /&gt;"nf_hh0":{"cf":"nf","col":"hh0","type":"string"}&lt;BR /&gt;}&lt;BR /&gt;}'''&lt;BR /&gt;df=spark.read.option("catalog",catalog).format("org.apache.spark.sql.execution.datasources.hbase").load()&lt;/P&gt;&lt;P&gt;df.show(1,False)&lt;/P&gt;&lt;P&gt;+------------------------------------------------+&lt;BR /&gt;| rowkey&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | nf_hh0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp;&lt;BR /&gt;+---------------------------+------------------- +&lt;BR /&gt;|26273707950926220...|ReportV10��&amp;nbsp; &amp;nbsp;|&lt;BR /&gt;+---------------------------+--------------------+&lt;/P&gt;&lt;P&gt;Spark version:&amp;nbsp;2.3.2.3.1.0.319-3&lt;/P&gt;&lt;P&gt;HBase version:&amp;nbsp;2.0.2.3.1.0.319-3&lt;/P&gt;&lt;P&gt;Python version: 2.7.5&lt;/P&gt;&lt;P&gt;Question: Is there any way to read those hexadecimal escape sequences as it is in a dataframe.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 06:28:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-read-hexadecimal-escape-sequences-from-Spark-using/m-p/390055#M247167</guid>
      <dc:creator>ayukus0705</dc:creator>
      <dc:date>2026-04-21T06:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to read hexadecimal escape sequences from Spark using shc connector.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-read-hexadecimal-escape-sequences-from-Spark-using/m-p/390439#M247265</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/111514"&gt;@ayukus0705&lt;/a&gt;&amp;nbsp;Welcome to our community! To help you get the best possible answer, I have tagged in our Spark experts &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/78612"&gt;@RangaReddy&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/81193"&gt;@Babasaheb&lt;/a&gt;&amp;nbsp;who may be able to assist you further.&lt;BR /&gt;&lt;BR /&gt;Please feel free to provide any additional information or details about your query, and we hope that you will find a satisfactory solution to your question.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 08:24:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-read-hexadecimal-escape-sequences-from-Spark-using/m-p/390439#M247265</guid>
      <dc:creator>VidyaSargur</dc:creator>
      <dc:date>2024-07-16T08:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to read hexadecimal escape sequences from Spark using shc connector.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-read-hexadecimal-escape-sequences-from-Spark-using/m-p/390441#M247266</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/111514"&gt;@ayukus0705&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The nf_hh0 column &lt;STRONG&gt;data&lt;/STRONG&gt; appears to be &lt;STRONG&gt;stored&lt;/STRONG&gt; in a &lt;STRONG&gt;format&lt;/STRONG&gt; &lt;STRONG&gt;other&lt;/STRONG&gt; than &lt;STRONG&gt;string&lt;/STRONG&gt;. When you try to read this data using a &lt;STRONG&gt;string data type&lt;/STRONG&gt;, it may lead to &lt;STRONG&gt;above issue&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;To &lt;STRONG&gt;resolve this issue&lt;/STRONG&gt;, you can either &lt;STRONG&gt;change the data type&lt;/STRONG&gt; of the &lt;STRONG&gt;column&lt;/STRONG&gt; to match the actual data format, or convert the &lt;STRONG&gt;data to a string format&lt;/STRONG&gt;.&lt;/P&gt;&lt;DIV class="container"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 08:48:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-read-hexadecimal-escape-sequences-from-Spark-using/m-p/390441#M247266</guid>
      <dc:creator>RangaReddy</dc:creator>
      <dc:date>2024-07-16T08:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to read hexadecimal escape sequences from Spark using shc connector.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-read-hexadecimal-escape-sequences-from-Spark-using/m-p/390760#M247330</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/111514"&gt;@ayukus0705&lt;/a&gt;,&amp;nbsp;Did the response assist in resolving your query? If it did, kindly mark the relevant reply as the solution, as it will aid others in locating the answer more easily in the future.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2024 08:58:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-read-hexadecimal-escape-sequences-from-Spark-using/m-p/390760#M247330</guid>
      <dc:creator>VidyaSargur</dc:creator>
      <dc:date>2024-07-22T08:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to read hexadecimal escape sequences from Spark using shc connector.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-read-hexadecimal-escape-sequences-from-Spark-using/m-p/393087#M248334</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/78612"&gt;@RangaReddy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for looking into my question.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;change the data type&amp;nbsp;of the&amp;nbsp;column&amp;nbsp;to match the actual data format -&amp;nbsp;&lt;/STRONG&gt;I tried passing binary in catalog but had no luck.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;convert the&amp;nbsp;data to a string format -&amp;nbsp;&lt;/STRONG&gt;It will result in data manipulation on HBase which is not practically a possible solution for us. Also, data size is somewhere around 50-60 TB.&lt;/P&gt;&lt;P&gt;I am looking for an option where we can directly read those hexadecimal escape sequences(i.e., &lt;SPAN&gt;ReportV10\x00\x00\x00\x00\x02\x02\x02&lt;/SPAN&gt;) as it is in my spark dataframe.&lt;/P&gt;&lt;P&gt;Let me know if you need further clarity or information, we can setup a meeting to discuss this.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ayush&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 07:04:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-read-hexadecimal-escape-sequences-from-Spark-using/m-p/393087#M248334</guid>
      <dc:creator>ayukus0705</dc:creator>
      <dc:date>2024-09-05T07:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to read hexadecimal escape sequences from Spark using shc connector.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-read-hexadecimal-escape-sequences-from-Spark-using/m-p/393869#M248608</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/111514"&gt;@ayukus0705&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;A]&lt;/P&gt;&lt;P&gt;I am looking for an option where we can directly read those hexadecimal escape sequences(i.e.,&amp;nbsp;ReportV10\x00\x00\x00\x00\x02\x02\x02) as it is in my spark dataframe.&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; You will have to make sure that&amp;nbsp;escape sequences are considered as raw binary data or strings without any spontaneous decoding or transformation.&lt;/P&gt;&lt;P&gt;Following is an example to read as a binary:&amp;nbsp;&lt;/P&gt;&lt;P&gt;val df = spark.read.format("binaryFile").load("path of your file here")&lt;/P&gt;&lt;P&gt;B]&lt;/P&gt;&lt;P&gt;Alternatively, you can use the HBase Spark connector to load the data as binary. When using the HBase Spark connector, there is no need for any automatic decoding or transformation into the required format. Refer the following docs for more details:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Private Cloud: &lt;A href="https://docs.cloudera.com/cdp-private-cloud-base/7.1.9/accessing-hbase/topics/hbase-example-using-hbase-spark-connector.html" target="_blank"&gt;https://docs.cloudera.com/cdp-private-cloud-base/7.1.9/accessing-hbase/topics/hbase-example-using-hbase-spark-connector.html&lt;/A&gt;?&lt;/P&gt;&lt;P&gt;Public Cloud: &lt;A href="https://docs.cloudera.com/runtime/7.2.18/accessing-hbase/topics/hbase-using-hbase-spark-connector.html" target="_blank"&gt;https://docs.cloudera.com/runtime/7.2.18/accessing-hbase/topics/hbase-using-hbase-spark-connector.html&lt;/A&gt;?&lt;/P&gt;&lt;P&gt;If you found this response assisted with your query, please take a moment to log in and click on&amp;nbsp;KUDOS &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&amp;amp; ”Accept as Solution" below this post.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 06:55:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-read-hexadecimal-escape-sequences-from-Spark-using/m-p/393869#M248608</guid>
      <dc:creator>Babasaheb</dc:creator>
      <dc:date>2024-09-24T06:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to read hexadecimal escape sequences from Spark using shc connector.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-read-hexadecimal-escape-sequences-from-Spark-using/m-p/394302#M248691</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/111514"&gt;@ayukus0705&lt;/a&gt;,&amp;nbsp;Did the response assist in resolving your query? If it did, kindly mark the relevant reply as the solution, as it will aid others in locating the answer more easily in the future.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2024 10:39:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-read-hexadecimal-escape-sequences-from-Spark-using/m-p/394302#M248691</guid>
      <dc:creator>VidyaSargur</dc:creator>
      <dc:date>2024-10-01T10:39:57Z</dc:date>
    </item>
  </channel>
</rss>

