mirror of
https://github.com/Azure/MachineLearningNotebooks.git
synced 2025-12-21 18:15:13 -05:00
update samples from Release-92 as a part of 1.31.0 SDK stable release
This commit is contained in:
18
how-to-use-azureml/azure-synapse/start_script.py
Normal file
18
how-to-use-azureml/azure-synapse/start_script.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from pyspark.sql import SparkSession
|
||||
|
||||
import argparse
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--input", default="")
|
||||
parser.add_argument("--output", default="")
|
||||
|
||||
args, unparsed = parser.parse_known_args()
|
||||
|
||||
spark = SparkSession.builder.getOrCreate()
|
||||
sc = spark.sparkContext
|
||||
|
||||
arr = sc._gateway.new_array(sc._jvm.java.lang.String, 2)
|
||||
arr[0] = args.input
|
||||
arr[1] = args.output
|
||||
|
||||
obj = sc._jvm.WordCount
|
||||
obj.main(arr)
|
||||
Reference in New Issue
Block a user