How to compare sql data with hdfc file data using Spark?

Hi, I have loaded the sql data into hdfs in csv file format. The sql data is keep change i.e modify or delete or update the existing records. So I want to find out the modified records in sql data with compare to csv file in hdfs.