File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed
docs/source/user_guide/apachespark Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -21,21 +21,20 @@ followed by the spark version, 3.2.1.
2121 import os
2222 import tempfile
2323
24- with tempfile.TemporaryDirectory() as td:
25- with open (os.path.join(td, " script.py" ), " w" ) as f:
26- f.write(
27- """
28- import pyspark
24+ SCRIPT_CONTENT = """
25+ import pyspark
2926
30- def main():
31- print("Hello World")
32- print("Spark version is", pyspark.__version__)
27+ def main():
28+ print("Hello World")
29+ print("Spark version is", pyspark.__version__)
3330
34- if __name__ == "__main__":
35- main()
36- """
37- )
31+ if __name__ == "__main__":
32+ main()
33+ """
3834
35+ with tempfile.TemporaryDirectory() as td:
36+ with open (os.path.join(td, " script.py" ), " w" ) as f:
37+ f.write(SCRIPT_CONTENT )
3938 name = f " dataflow-app- { str (uuid4())} "
4039 dataflow_configs = (
4140 DataFlow()
You can’t perform that action at this time.
0 commit comments