<?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: Escaping field delimiters in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Escaping-field-delimiters/m-p/869#M98</link>
    <description>&lt;P&gt;Thanks for the answer,&lt;/P&gt;&lt;P&gt;I've tried it but faced another problem probably related to the positioning of the jar.&lt;/P&gt;&lt;P&gt;I've put it in the folder /usr/lib/hive/lib on all the datanode and even on the namenode and secnamenode (just to cover all the basis).&lt;/P&gt;&lt;P&gt;Even tried to load it by Hue (query editor) but nothing, maybe is a problem of my cluster (prototyping one).&lt;/P&gt;&lt;P&gt;Actually I've solved using&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="1"&gt;&amp;nbsp; &amp;nbsp;ROW FORMAT DELIMITED FIELDS TERMINATED BY '\073'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="1"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="1"&gt;I did forget that octal representation of escapes.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="1"&gt;Anyway thank you for your time&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="1"&gt;Rob&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Aug 2013 07:28:27 GMT</pubDate>
    <dc:creator>rpagnin</dc:creator>
    <dc:date>2013-08-22T07:28:27Z</dc:date>
    <item>
      <title>Escaping field delimiters</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Escaping-field-delimiters/m-p/759#M95</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to implement a simple data analytic use case.&lt;/P&gt;&lt;P&gt;I put in the cluster files with random number of rows similar to the following (fields could be populated randomly):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;FONT face="courier new,courier" size="1"&gt;--;1374487936469;'';;;;;;;;;;;0.24516626;-0.85808194;7.4775715;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I create a Hive external table w/ the following command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;CREATE EXTERNAL TABLE myTable (f1 STRING, f2 STRING, f3 STRING, f4 STRING, &amp;lt;otherFields&amp;gt; )&amp;nbsp;&lt;/FONT&gt;&lt;BR /&gt;&lt;SPAN style="line-height: normal; font-family: 'courier new', courier;"&gt;ROW FORMAT DELIMITED&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;FIELDS TERMINATED BY '\U003B'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LINES TERMINATED BY '\n' &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;STORED AS TEXTFILE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOCATION '/user/test/2013-07_08';&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In&amp;nbsp;&lt;SPAN&gt;'/user/test/2013-07_08' there is at least a file w/ rows similar to the one described above.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Trying to select a bunch of rows w/: &amp;nbsp;select * from myTable limit 10;&lt;/P&gt;&lt;P&gt;I obtain a resultset of 10 rows where each row contains a complete line of the file addressed&amp;nbsp;&lt;SPAN&gt;in column f1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"&amp;nbsp;&lt;SPAN&gt;FIELDS TERMINATED BY '\U003B'&amp;nbsp;&lt;/SPAN&gt;" doesn't work, but even w/ '\u037E, ';' (this raises a stringLiteral error), '\059'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Seems a simple problem but I can't realize which, and... I can't change the separator.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Have you any advice?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Rob&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 08:47:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Escaping-field-delimiters/m-p/759#M95</guid>
      <dc:creator>rpagnin</dc:creator>
      <dc:date>2022-09-16T08:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Escaping field delimiters</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Escaping-field-delimiters/m-p/763#M96</link>
      <description>&lt;P&gt;Use&amp;nbsp;&lt;SPAN&gt;Hive SerDe for CSV&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="https://github.com/ogrodnek/csv-serde"&gt;https://github.com/ogrodnek/csv-serde&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, refer&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="https://issues.apache.org/jira/browse/HIVE-136"&gt;https://issues.apache.org/jira/browse/HIVE-136&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2013 14:51:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Escaping-field-delimiters/m-p/763#M96</guid>
      <dc:creator>dvohra</dc:creator>
      <dc:date>2013-08-20T14:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Escaping field delimiters</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Escaping-field-delimiters/m-p/767#M97</link>
      <description>&lt;P&gt;The good thing is that you created an external table, so you can just delete the table and recreate it. The underlying data in HDFS (/user/test/...) wouldn't be deleted.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2013 17:00:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Escaping-field-delimiters/m-p/767#M97</guid>
      <dc:creator>mgrover</dc:creator>
      <dc:date>2013-08-20T17:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: Escaping field delimiters</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Escaping-field-delimiters/m-p/869#M98</link>
      <description>&lt;P&gt;Thanks for the answer,&lt;/P&gt;&lt;P&gt;I've tried it but faced another problem probably related to the positioning of the jar.&lt;/P&gt;&lt;P&gt;I've put it in the folder /usr/lib/hive/lib on all the datanode and even on the namenode and secnamenode (just to cover all the basis).&lt;/P&gt;&lt;P&gt;Even tried to load it by Hue (query editor) but nothing, maybe is a problem of my cluster (prototyping one).&lt;/P&gt;&lt;P&gt;Actually I've solved using&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="1"&gt;&amp;nbsp; &amp;nbsp;ROW FORMAT DELIMITED FIELDS TERMINATED BY '\073'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="1"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="1"&gt;I did forget that octal representation of escapes.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="1"&gt;Anyway thank you for your time&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="1"&gt;Rob&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2013 07:28:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Escaping-field-delimiters/m-p/869#M98</guid>
      <dc:creator>rpagnin</dc:creator>
      <dc:date>2013-08-22T07:28:27Z</dc:date>
    </item>
  </channel>
</rss>

