I was able to achieve my aim with the help of below site: https://www.bmc.com/blogs/write-apache-spark-elasticsearch-python/
However, I want to sent date as a datetim