#!/usr/bin/python
# -*- coding: UTF-8 -*-
from pyspark.sql import SparkSession

spark = SparkSession.builder.enableHiveSupport().getOrCreate()
spark.sql("use sparktest")
df = spark.sql("select *from people")
print("读取hive数据，df的类型:", type(df))
df.show()


