1

I can't find good source code to try writing a pandas dataframe that's sitting on my local machine, to a HIVE database for a hadoop cluster.

I can query a table and convert it to a pandas dataframe using pyodbc and an odbc driver but I can't write a pandas dataframe to a hive table.

Should I be using sqlalchemy or pyodbc? can I see some examples that use a DSN or account for kerberos auth?

from pyhive import hive
from sqlalchemy import create_engine
engine = create_engine('hive://myDSN')
engine.connect()

import pyodbc
pyodbc.autocommit = True
connection = pyodbc.connect('dsn=myDSN', autocommit = True)

sqlalchemy says I can't connect to any ports, but pyodbc connects no problem.

jst
  • 25
  • 5

0 Answers0