Using Python to connect hive,
The From IMPALA.DBAPI Import Connect statement reported the following error:
THRIFTPARSERERROR:THRIFTPY does not support generating module with path in protocol ' d '
Navigate to D:\Anaconda3\Lib\site-packages\thriftpy\parser\parser.py's
if Url_scheme = = ':
with open (path) as FH:
data = Fh.read ()
Elif url_scheme in (' http ', ' HTTPS '):
data = Urlopen (path). Read ()
Else
Raise Thriftparsererror (' thriftpy does not support generating module '
' with path in protocol \ ' {}\ '. Format (
Url_scheme))
Change to
if Url_scheme = = ':
with open (path) as FH:
data = Fh.read ()
Elif Url_scheme in (' C ', ' d ', ' e ', ' F '):
with open (path) as FH:
data = Fh.read ()
Elif url_scheme in (' http ', ' HTTPS '):
data = Urlopen (path). Read ()
Else
Raise Thriftparsererror (' thriftpy does not support generating module '
' with path in protocol \ ' {}\ '. Format (
Url_scheme))
The command line compiles using python-m py_comile parser.py to