Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. from pyspark.sql import HiveContext
  2. sqlContext = HiveContext(sc)
  3. rows = sqlContext.sql("SELECT * FROM employees")
  4. for row in rows:
  5. print(row)
  6. for row in rows:
  7. print(row.first_name)
  8.  
  9. from pyspark.sql import HiveContext
  10. sqlContext = HiveContext(sc)
  11. rows = sqlContext.sql("SELECT * FROM employees")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement