I am using something like this:
df.withColumn("idx", monotonically_increasing_id())
But I get an exception:
at org.a