<?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 access hive database/tables through spark and pyspark shell? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/how-to-access-hive-database-tables-through-spark-and-pyspark/m-p/90956#M3913</link>
    <description>Hi Harish,&lt;BR /&gt;&lt;BR /&gt;You can create a hive context and can access the hive table.&lt;BR /&gt;&lt;BR /&gt;Example Program:&lt;BR /&gt;&lt;BR /&gt;from pyspark.sql import HiveContext&lt;BR /&gt;hive_context = HiveContext(sc)&lt;BR /&gt;sample = hive_context.table("default.&amp;lt;tablename&amp;gt;")&lt;BR /&gt;sample.show()&lt;BR /&gt;&lt;BR /&gt;Reference Link: &lt;A href="https://stackoverflow.com/questions/36051091/query-hive-table-in-pyspark" target="_blank"&gt;https://stackoverflow.com/questions/36051091/query-hive-table-in-pyspark&lt;/A&gt;</description>
    <pubDate>Tue, 28 May 2019 10:56:12 GMT</pubDate>
    <dc:creator>Jerry</dc:creator>
    <dc:date>2019-05-28T10:56:12Z</dc:date>
  </channel>
</rss>

