Created
October 21, 2021 23:04
-
-
Save nfarah86/1aa679c02b74267a4821b145c2bed195 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
def create_spark_session(): | |
spark = SparkSession \ | |
.builder \ | |
.config("spark.jars.packages", "org.apache.hadoop:hadoop-aws:3.2.0") \ | |
.config("spark.hadoop.fs.s3a.impl","org.apache.hadoop.fs.s3a.S3AFileSystem") \ | |
.getOrCreate() | |
sc=spark.sparkContext | |
return spark |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment