0

I'm running the following block of Python commands in a Jupyter notebook to upload my dataframe, labeled df, to Impala:

import hdfs
from hdfs.ext.kerberos import KerberosClient
import pandas as pd
import ibis
hdfs = KerberosClient('< URL address >')
client = ibis.impala.connect(host="impala.sys.cigna.com", port=25003, timeout=3600, auth_mechanism="GSSAPI", hdfs_client=hdfs)
db=client.database("< database >")
db.create_table("pythonIBISTest", df)

. . . but am getting the error message AttributeError: module 'ibis' has no attribute 'impala'.

Note: I've already installed the hdfs, ibis, ibis-framework[Kerberos], and impyla modules in the Jupyter terminal.

What am I doing wrong?

RobertF
  • 824
  • 2
  • 14
  • 40
  • 1
    `ibis` in PyPI is a different package. Uninstall `ibis` and install only `ibis-framework` – Oluwafemi Sule Mar 14 '19 at 05:00
  • @OluwafemiSule Thanks - I think I'm closer to a solution. I uninstalled `ibis`, restarted my kernel, then reran my code. I'm now seeing an error message: `HdfsError: Authentication failure. Check your credentials.` – RobertF Mar 14 '19 at 05:27

1 Answers1

0

You may need to pip install ibis-framework[impala] to get the impala part of ibis

thaavik
  • 3,257
  • 2
  • 18
  • 25
  • Thanks for the suggestion - I spoke with one of my company's programmers & he created a custom Python package that allows us to write table to Impala. – RobertF Sep 09 '19 at 16:51