spark_partition_id {SparkR}R Documentation

Return the partition ID as a column

Description

Return the partition ID of the Spark task as a SparkDataFrame column. Note that this is nondeterministic because it depends on data partitioning and task scheduling.

Usage

## S4 method for signature 'missing'
spark_partition_id()

spark_partition_id(x = "missing")

Arguments

x

empty. Should be used with no argument.

Details

This is equivalent to the SPARK_PARTITION_ID function in SQL.

Note

spark_partition_id since 2.0.0

Examples

## Not run: select(df, spark_partition_id())

[Package SparkR version 2.0.2 Index]