How to run a script in PySpark

后端 未结 5 2038
太阳男子
太阳男子 2020-12-14 15:59

I\'m trying to run a script in the pyspark environment but so far I haven\'t been able to. How can I run a script like python script.py but in pyspark? Thanks

5条回答
  •  悲哀的现实
    2020-12-14 16:34

    You can execute "script.py" as follows

    pyspark < script.py
    

    or

    # if you want to run pyspark in yarn cluster
    pyspark --master yarn < script.py
    

提交回复
热议问题