Created
November 23, 2017 11:26
-
-
Save dgadiraju/35c070384c0d8b67e919d24ce38814a8 to your computer and use it in GitHub Desktop.
This file contains 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
val orders = sc.textFile("/public/retail_db/orders") | |
// Previewing data | |
orders.first | |
orders.take(10).foreach(println) | |
orders.count | |
// Use collect with care. | |
// As it creates single threaded list from distributed RDD, | |
// using collect on larger datasets can cause out of memory issues. | |
orders.collect.foreach(println) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment