Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from pyspark.sql import HiveContext
- sqlContext = HiveContext(sc)
- rows = sqlContext.sql("SELECT * FROM employees")
- for row in rows:
- print(row)
- for row in rows:
- print(row.first_name)
- from pyspark.sql import HiveContext
- sqlContext = HiveContext(sc)
- rows = sqlContext.sql("SELECT * FROM employees")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement