Bemærk
Adgang til denne side kræver godkendelse. Du kan prøve at logge på eller ændre mapper.
Adgang til denne side kræver godkendelse. Du kan prøve at ændre mapper.
Returns the underlying SparkContext.
Syntax
sparkContext
Returns
SparkContext
Examples
:::note Serverless compatibility
spark.sparkContext is not available on Databricks Serverless compute. Use the spark (SparkSession) APIs directly: for example, spark.createDataFrame(...) in place of spark.sparkContext.parallelize(...).
:::
spark.sparkContext
# <SparkContext master=... appName=...>
# Create an RDD from the Spark context.
rdd = spark.sparkContext.parallelize([1, 2, 3])
rdd.collect()
# [1, 2, 3]