Created
March 14, 2017 07:40
-
-
Save obar1/ec99eb06dfb8a9383cea60bd76fe64f0 to your computer and use it in GitHub Desktop.
pyspark submit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pyspark import SparkContext, SparkConf | |
| conf = SparkConf().setAppName("myPyspark") | |
| sc = SparkContext(conf=conf) | |
| dataRDD = sc.textFile("/user/ma186082/sqoop_import/departments") | |
| for line in dataRDD.collect(): | |
| print(line) | |
| dataRDD.saveAsTextFile("/user/ma186082/pyspark/departments") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment