From bee010b99699723432435646486dc8e0ecebbea3 Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Tue, 29 Aug 2023 16:21:55 -0600 Subject: Very basic example working --- main.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 main.py (limited to 'main.py') diff --git a/main.py b/main.py new file mode 100644 index 0000000..166a9fc --- /dev/null +++ b/main.py @@ -0,0 +1,9 @@ +from pyspark.sql import SparkSession + +spark = SparkSession.builder.getOrCreate() +dataList = [1, 2, 3, 4, 5] +rdd = spark.sparkContext.parallelize(dataList) +rdd2 = rdd.flatMap(lambda x: str(x)) +data = rdd2.collect() +for x in data: + print(type(x), x) -- cgit v1.2.3