title: Using Python to connect to Impala database (thriftpy error)
body: <p>What I'm trying to do is very basic: connect to an Impala db using Python:</p>
  
  <pre><code>from impala.dbapi import connect
  
  conn = connect(host='impala', port=21050, auth_mechanism='PLAIN')
  </code></pre>
  
  <p>I'm using Impyla package to do so. I got this error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/usr/local/lib/python3.6/dist-packages/thriftpy/transport/socket.py", line 96, in open
      self.sock.connect(addr)
  socket.gaierror: [Errno -3] Temporary failure in name resolution
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/home/alaaeddine/PycharmProjects/test/data_test.py", line 3, in &lt;module&gt;
      conn = connect(host='impala', port=21050, auth_mechanism='PLAIN')
    File "/usr/local/lib/python3.6/dist-packages/impala/dbapi.py", line 147, in connect
      auth_mechanism=auth_mechanism)
    File "/usr/local/lib/python3.6/dist-packages/impala/hiveserver2.py", line 758, in connect
      transport.open()
    File "/usr/local/lib/python3.6/dist-packages/thrift_sasl/__init__.py", line 61, in open
      self._trans.open()
    File "/usr/local/lib/python3.6/dist-packages/thriftpy/transport/socket.py", line 104, in open
      message="Could not connect to %s" % str(addr))
  thriftpy.transport.TTransportException: TTransportException(type=1, message="Could not connect to ('impala', 21050)")
  </code></pre>
  
  <p>Tried also the Ibis package but failed with the same thriftpy related error.</p>
  
  <p>In Windows using Dbeaver, I could connect to the database using the official Cloudera JDBC connector. My questions are:</p>
  
  <ul>
  <li>Should pass my JDBC connector as parameter in my connect code? I have made some search I could not find something pointing at this direction.</li>
  <li>Should I try something else than Ibis and Impyla packages? I had experienced a lot of version related issues and dependencies when using them. If yes, what would you recommend as alternatives?</li>
  </ul>
  
  <p>Thanks!</p>