spark_partition_id {SparkR}R Documentation

Return the partition ID as a column

Description

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

Usage

spark_partition_id(x = "missing")

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

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.1.2 Index]