Python Script Activity

Runs Python script with an access to underling SparkContext.

Parameters

Name

Description

Type

Default

Title

Title of the activity to display on the designer.

text

Version

Python interpreter major version.

enum

Python2

Script

Python script

text

Sample Python Script

from pyspark.sql import Row

numbers = dataRowContext.sc.parallelize(xrange(1, 10))
view = numbers.map(lambda n: Row(n)).toDF(["numbers"])
view.createTempView("pyView")