<?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: How to export the header of hive table into CSV file? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-export-the-header-of-hive-table-into-CSV-file/m-p/223060#M184925</link>
    <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/80182/chiranjeevivenkata51.html"&gt;Venkat&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You should be getting both header and data with this command. I have just added "hive.cli.print.header=true" to print header along with data.&lt;/P&gt;&lt;PRE&gt;hive -e 'set hive.cli.print.header=true; select * from your_Table' | sed 's/[\t]/,/g' &amp;gt; /home/yourfile.csv&lt;/PRE&gt;&lt;P&gt;Whats the result you are seeing if you just do "select * from your_Table"? Does the table have the data?&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jun 2018 08:32:57 GMT</pubDate>
    <dc:creator>ssharma</dc:creator>
    <dc:date>2018-06-21T08:32:57Z</dc:date>
  </channel>
</rss>

