title: query Kerberized Hive with SQL Alchemy
body: <p>I'm trying to query a Kerberized Hive cluster with <a href="http://www.sqlalchemy.org/" rel="nofollow noreferrer" title="SQL Alchemy">SQL Alchemy</a>. I'm able to submit queries using <a href="https://pypi.python.org/pypi/pyhs2/0.6.0" rel="nofollow noreferrer" title="pyhs2">pyhs2</a> which confirms that it's possible to connect and query Hive when authenticated by Kerberos:</p>
  <pre><code>import pyhs2
  with pyhs2.connect(host='hadoop01.woolford.io',
                     port=10500,
                     authMechanism='KERBEROS') as conn:
      with conn.cursor() as cur:
          cur.execute('SELECT * FROM default.mytable')
          records = cur.fetchall()
          # etc ...
  </code></pre>
  <p>I notice that <a href="https://github.com/apache/incubator-airflow" rel="nofollow noreferrer" title="Airbnb's Airflow">Airbnb's Airflow</a> uses SQL Alchemy and can connect to Kerberized Hive and so I imagine it's possible to do something like this:</p>
  <pre><code>engine = create_engine('hive://hadoop01.woolford.io:10500/default', connect_args={'?': '?'})
  connection = engine.connect()
  connection.execute(&quot;SELECT * FROM default.mytable&quot;)
  # etc ...
  </code></pre>
  <p>I'm not sure what parameters should be set in the <code>connect_args</code> dictionary. Can you see what needs to be added to make this work (e.g. Kerberos service name, realm, etc.)?</p>
  <h1>update:</h1>
  <p>Under the hood SQL Alchemy is using PyHive to connect to Hive. The current version of PyHive, v0.2.1, doesn't support Kerberos.</p>
  <p>I notice that someone from Yahoo created a <a href="https://github.com/dropbox/PyHive/pull/70" rel="nofollow noreferrer" title="pull request">pull request</a> that provides support for Kerberos. This PR has not yet been merged/released and so I just copied the code from the PR into <code>/usr/lib/python2.7/site-packages/pyhive/hive.py</code> on the Superset server created a connection like this:</p>
  <pre><code>engine = create_engine('hive://hadoop01:10500', connect_args={'auth': 'KERBEROS', 'kerberos_service_name': 'hive'})
  </code></pre>
  <p>Hopefully, the maintainer of PyHive will merge/release the support for Kerberos.</p>