Get started
Load & manage data
Work with data
Administration
Reference & resources
Updated Jun 02, 2023
Send us feedback
spark_partition_id
Applies to: Databricks SQL Databricks Runtime
Returns the current partition ID.
spark_partition_id()
The function takes no arguments.
An INTEGER.
> SELECT spark_partition_id(); 0