Skip to content

Commit f979808

Browse files
committed
make connect app configurable
1 parent 1243a1e commit f979808

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

spark-connect-client/stackable/spark-connect-examples/python/simple-connect-app.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
import sys
2+
13
from pyspark.sql import SparkSession
24

35
if __name__ == "__main__":
6+
remote: str = sys.argv[1]
47
spark = (
5-
SparkSession.builder.appName("SampleConnectApp")
6-
.remote("sc://localhost")
8+
SparkSession.builder.appName("SimpleSparkConnectApp")
9+
.remote(remote)
710
.getOrCreate()
811
)
912

0 commit comments

Comments
 (0)