编程语言
首页 > 编程语言> > python读取 hive数据

python读取 hive数据

作者:互联网

import pandas as pd
import re
from impala.dbapi import connect
from impala.util import as_pandas
from impala.dbapi import connect
import json,sys
from datetime import datetime

conn=connect(host='127.0.0.1', port=21050, database='ods',timeout = 30)
cursor=conn.cursor()
cursor.execute("show tables")
data=as_pandas(cursor)
print(data)

标签:读取,python,hive,datetime,cursor,connect,import,impala,pandas
来源: https://blog.csdn.net/luoganttcc/article/details/119350031