Skip to content

Added sys path to guarantee imports | Added SparkConf to all files #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 4, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Reverted sparkSql/StackOverflowSurvey to local version
  • Loading branch information
Pedro Bernardo committed Feb 4, 2018
commit ac8e586009799e1aedd074dd850253e8b97033d2
6 changes: 2 additions & 4 deletions sparkSql/StackOverFlowSurvey.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@
if __name__ == "__main__":

session = SparkSession.builder.appName("StackOverFlowSurvey").getOrCreate()
sc = session.sparkContext
sc.setLogLevel('ERROR')


dataFrameReader = session.read

responses = dataFrameReader \
.option("header", "true") \
.option("inferSchema", value = True) \
.csv("s3n://stackoverflow-analytics-pedro/2016-stack-overflow-survey-responses.csv")
.csv("in/2016-stack-overflow-survey-responses.csv")

print("=== Print out schema ===")
responses.printSchema()
Expand Down