Created
October 29, 2015 15:51
-
-
Save amelio-vazquez-reina/d611baebe897ee97fe48 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 sqlCtx = new org.apache.spark.sql.hive.HiveContext(sc) | |
val results = sqlCtx.sql( | |
"SELECT * FROM events where d='26022015' and pmessage_type='attribution' limit 100") | |
results.map(t => "Name: " + t(0)).collect().foreach(println) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment