Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2025 08:48 AM
Hi @Ramana ,
Yep, RDD API is not supported on Serveless
As a workaround you can obtain number of partitions in following way - using spark_partiton_id and then counting distinct occurance of each id
from pyspark.sql.functions import spark_partition_id, countDistinct
df = spark.read.table("workspace.default.product_dimension")
display((
df.withColumn("partitionid",spark_partition_id())
.select("partitionid")
.agg(countDistinct("partitionid"))
))