title: Access Hive (Hiveserver2) Using Python
body: <p>My whole goal is to manipulate Hive like everyone manipulate sqldb using MySQLdb in Python.</p>
  
  <ul>
  <li><p>hue shell: I have no problem querying Hive table in hue shell, however, the hue shell is somehow a wrapper built on python with a lot of configurations added comparing with simple python. For example, tons of <code>sys.path</code> and <code>os.environ</code> has been added and even if I copied exactly the same path and environment variable  when I open Python, it still will not work due to some error <code>AttributeError: 'ConfigSection' object has no attribute 'HUE_PRINCIPAL'</code>.</p></li>
  <li><p>The <a href="https://stackoverflow.com/questions/17722372/access-hive-data-using-python">method here</a> works only for hiveserver1, I think. And the conversation from <a href="https://groups.google.com/a/cloudera.org/forum/#!topic/cdh-user/lCSuh6vLmHM" rel="nofollow noreferrer">here</a> keeps talking about get client generated by thrift. I have zero experience working with thrift and I am wondering am I on the wrong way, before diving into thrift.</p></li>
  </ul>
  
  <p>Any help would be appreicated!</p>