티스토리 뷰

728x90
import os
import sys

n = int(sys.argv[1])
a = 2
tables = []
for _ in range(n):
    tables.append(sys.argv[a])
    a += 1
print(tables)

https://stackoverflow.com/questions/32217160/can-i-add-arguments-to-python-code-when-i-submit-spark-job

 

Can I add arguments to python code when I submit spark job?

I'm trying to use spark-submit to execute my python code in spark cluster. Generally we run spark-submit with python code like below. # Run a Python application on a cluster ./bin/spark-submit \...

stackoverflow.com

 

728x90
댓글