Created
March 28, 2018 17:12
-
-
Save nmukerje/d805c83cc56d5b1d3e0f93c594635968 to your computer and use it in GitHub Desktop.
Read multiline json from S3
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
data = sc.wholeTextFiles('s3://<bucket>/dataset249').map(lambda x:x[1]) | |
print(data.collect()) | |
df=spark.read.json(data) | |
df.printSchema() | |
df.count() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment