Using monotonically_increasing_id()
monotonically_increasing_id
is efficient at generating a column of integers that is always increasing. It is useful for creating a unique id per row. Which of the following sequences would not be generated by the monotonically_increasing_id
operation?
This exercise is part of the course
Introduction to Spark SQL in Python
Hands-on interactive exercise
Turn theory into action with one of our interactive exercises
