Geo_point write from spark into elasticsearch


(Roberto Sancho Rojas) #1

Hi:

from spark into elastic i can insert geo_point fiield like that, but, I cant show that in map on kibana, please anny sugestions??, here the code and pictures:

I tried to insert from diferent form but doesnt work:

ddr1 = df1.select("").map(lambda line: ('id',{"geo_sucursal":{"location":{"lon":"41.12","lat":"-71.34"}},'fecha_creacion': '2016-02-12'}))
ddr1 = df1.select("
").map(lambda line: ('id',{"geo_sucursal":{"location":{"lon":41.12,"lat":-71.34}},'fecha_creacion': '2016-02-12'}))
ddr1 = df1.select("*").map(lambda line: ('id',{'location': { 'lat': 41.12,'lon': -71.34},'fecha_creacion': '2016-02-12'}))


(Mark Walkom) #2

Is the field mapped correctly? https://www.elastic.co/guide/en/elasticsearch/reference/5.0/geo-point.html


(Roberto Sancho Rojas) #3

Hi:

now it working after mapped correctly, but now, the error is beacuse i have
empty string value for lat and lon, anny suggestion?

Thanks


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.