Last active
March 31, 2023 07:52
-
-
Save nordineb/4b96bbe8412ab1653d8f067f41bdc433 to your computer and use it in GitHub Desktop.
emptysparkpy.py
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
import os | |
from pyspark.sql import SparkSession | |
# Create a SparkSession object | |
spark = SparkSession.builder.appName("SparkSQL Example").getOrCreate() | |
# do something to prove it works | |
rdd = sc.parallelize(range(100000)) | |
x=rdd.sumApprox(3) | |
print(x) | |
# Stop the SparkSession | |
spark.stop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment