I\'m currently trying to extract a database from MongoDB and use Spark to ingest into ElasticSearch with geo_points.
geo_points
The Mongo database has latitude and
Try this:
import org.apache.spark.sql.functions._ df.registerTempTable("dt") dfres = sql("select struct(lat,lon) as colName from dt")