How to pick latest record in spark structured streaming join
问题 I am using spark-sql 2.4.x version , datastax-spark-cassandra-connector for Cassandra-3.x version. Along with kafka. I have rates meta data of currency sample as below : val ratesMetaDataDf = Seq( ("EUR","5/10/2019","1.130657","USD"), ("EUR","5/9/2019","1.13088","USD") ).toDF("base_code", "rate_date","rate_value","target_code") .withColumn("rate_date", to_date($"rate_date" ,"MM/dd/yyyy").cast(DateType)) .withColumn("rate_value", $"rate_value".cast(DoubleType)) Sales records which i received