{
"bytes" : 2208,
"longitude" : -122.0,
"app" : "gmail",
"timestamp" : 1463170946,
"latitude" : 37.4,
"user" : "abc@domain"
}
My ingest spec has this dimensionsSpec attribute -
"parser" : {
"type" : "string",
"parseSpec" : {
"format" : "json",
"timestampSpec" : {
"column" : "timestamp",
"format" : "posix"
},
"dimensionsSpec" : {
"dimensions": ["app","user"],
"dimensionExclusions" : [],
"spatialDimensions" : [
{ "dimName": "location", "dims":["latitude", "longitude"]}
]
}
}
},
My understanding is that this makes lat and long available for filtering via the alias 'location'. So I was expecting this query to work -
"filter": {
"type": "spatial",
"dimension": "location",
"bound": {
"maxCoords": [
0.0,
90.0
],
"type": "rectangular",
"minCoords": [
-180.0,
0.0
]
}
},
but it returns an empty result set. I should mention this filter is part of a 'groupBy' query, where I group by app and user. When I remove the filter, I see the expected results, so at least that I know the data was ingested.
Another question - does Druid support ingestion of geo data where the coordinates are contained in an array like so - {'location': [-122.0, 37.4]} instead of separate latitude and longitude attributes ? If so, how do I specify this in the ingest spec? Can it say - { 'spatialDimensions': [ {'dimName': 'location'} ] } ?
I've looked at other posts related to spatial dimensions, but can't find one that matches the exact same issue. Any help would be greatly appreciated.
thanks
Nandan
--
You received this message because you are subscribed to the Google Groups "Druid User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to druid-user+unsubscribe@googlegroups.com.
To post to this group, send email to druid...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/druid-user/9779f8ae-9649-4a42-aca5-c13954fca801%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
"filter": {
"type": "spatial",
"dimension": "location",
"bound": {
"coords": [
37.4,
-122.0
],
"type": "radius",
"radius": 1000.0
}
}
Gian
To unsubscribe from this group and stop receiving emails from it, send an email to druid-user+...@googlegroups.com.