## Move data between HDF-S and Spark - pyspark
# read some text file
sc.textFile("sqoop_import/departments").take(1)
# looping into a rdd
data=sc.textFile("sqoop_import/departments")
for i in data.collect():
print(i)
# reading from local fs
sc.textFile("file:///tmp/departments.json").take(3)