aboutsummaryrefslogtreecommitdiff
path: root/examples/src/main/python/sql.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/src/main/python/sql.py')
-rw-r--r--examples/src/main/python/sql.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/src/main/python/sql.py b/examples/src/main/python/sql.py
index 59a46cb283..5594223465 100644
--- a/examples/src/main/python/sql.py
+++ b/examples/src/main/python/sql.py
@@ -25,7 +25,10 @@ from pyspark.sql.types import Row, StructField, StructType, StringType, IntegerT
if __name__ == "__main__":
- spark = SparkSession.builder.appName("PythonSQL").getOrCreate()
+ spark = SparkSession\
+ .builder\
+ .appName("PythonSQL")\
+ .getOrCreate()
# A list of Rows. Infer schema from the first row, create a DataFrame and print the schema
rows = [Row(name="John", age=19), Row(name="Smith", age=23), Row(name="Sarah", age=18)]