I tried to do group by in SparkSQL which works good but most of the rows went missing.
spark.sql( """ | SELECT | website_session_id, |