drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yousuf <yousufud...@css.org.sa>
Subject nested array flatten and then group by - Apache drill
Date Sun, 11 Dec 2016 08:10:26 GMT
Hi,

How can I retrieve hashtags[n].text values as flatten from the following 
json document (storage mongo). My final goal is to group text with count.

Apache drill version : 1.8.0
MongoDB version: 3.2

I've tried several examples but my final result is either empty array eg 
[] or blank.

{
     "twitter_entities": {
         "hashtags": [{
             "text": "snow",
             "indices": [
                 66,
                 71
             ]
         }, {
             "text": "skiing",
             "indices": [
                 73,
                 80
             ]
         }],
         "trends": [],
         "urls": [{
             "url": "http://xxxxxxx",
             "expanded_url": "http://xxxxx",
             "display_url": xxxxx",
             "indices": [
                 71,
                 93
             ]
         }]
     }
}

Any help is appreciated
Regards
Yousuf



Mime
View raw message