8642/sorting-rows-in-descending-order-in-spark-sql
Import org.apache.spark.sql.DataFrame library. You can sort in descending order by the following command:
df.sort($"col".desc)
df.orderBy(org.apache.spark.sql.functions.col("columnname").desc)
df.orderBy($"col".desc) - this works as well
Hi, @Sai,
Thanks for your contribution.
Cheers.
Caching the tables puts the whole table ...READ MORE
Both 'filter' and 'where' in Spark SQL ...READ MORE
In sparkSql, we can use CASE when ...READ MORE
You will need to use Spark session ...READ MORE
Instead of spliting on '\n'. You should ...READ MORE
JDBC is not required here. Create a hive ...READ MORE
Please check the below mentioned links for ...READ MORE
Spark has various components: Spark SQL (Shark)- for ...READ MORE
I guess you need provide this kafka.bootstrap.servers ...READ MORE
RDD is a fundamental data structure of ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.