Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to use python connect impala with kerberos?

How to use python connect impala with kerberos?

New Contributor

I wany to use python connect impala,and the cluster is kerberozied,I can use java jdbc successful ,and the settings like this :

 

UserGroupInformation.loginUserFromKeytab("username/mydomain.com@mydomain.COM","/usr/username.keytab");  

 

jdbc:impala://192.168.1.10:21050/default;AuthMech=1;KrbRealm='mydomain.com';KrbHostFQDN=hostalias;KrbServiceName=impala

 

I have try Impyla,but failed, it throws sasl can't start,how can i connect impala with python?

2 REPLIES 2

Re: How to use python connect impala with kerberos?

Champion

@yueyang

 

Pls try to add the below principal in your connection string, it 'may' help you

 

";principal=impala/hostname@REALM"

 

hostname - hostname where you have configured impala/hive

REALM - for your kerberos

Re: How to use python connect impala with kerberos?

Guru
Hi yueyang,

Can you please share your impyla source code and the error you are getting? That will help me understand why it failed.

Thanks