incubator-drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Haviv <danielru...@gmail.com>
Subject Querying nested JSON
Date Wed, 29 Oct 2014 17:24:22 GMT
Hi,
I have the following JSON:

{"geoLocationInfo":{"region":"40","mobile_operator":"TRUEINTTH","ip_routing_type":"","connection_type":"","ip":"171.96.247.102","country":"TH","city":"bangkok","is_cache":false,"postal_code":"10540","carrier":"True
Internet","longitude":100.71670532226562,"latitude":13.600006103515625,"is_longlat_from_req":false},"markup":"html","publisher_id":84,"bs_width":0,"request_type":0,"impression_id":"14144917224026328287047648533877","app_name":null,"mode":"Live","handling_time":0,"source_ip":"23.110.21.118","age":null,"device_id_hash":"none","gender":null,"user_id":null,"deviceIdType":"na","adformat":"txt","selected_campaigns":"||","request_date":1414491722402,"site_id":"1344","deviceInfo":{"device_os":"Android","is_tablet":true,"is_opera":false,"screen_width":1024,"user_agent":"Mozilla\/5.0
(Linux; U; Android 4.2.2; th-th; SM-T110 Build\/JDQ39)
AppleWebKit\/534.30 (KHTML, like Gecko) Version\/4.0
Safari\/534.30","is_touch_screen":true,"device_matching_result":"exact_match","model_name":"SM-T110","brand_name":"Samsung","screen_height":600},"udid":null,"request_source":"mobapp","referrer":null,"adspaces":"default","request_id":"6328287047648533877","customParams":{},"app_id":null,"headerParams":{},"categories":["politics","alcohol","betting","mobile_content","dating","ringtones","general"],"computer_id":12,"bs_height":0}

I'm trying to access the region property of the geoLocationInfo nested
json using the following query:
0: jdbc:drill:> select geoLocationInfo[0].region from
hdfs.source.`requests.json`;

but I'm hitting a wall:
Query failed: Failure while running fragment. The current reader
doesn't support getting next information.
[2055ef8c-d600-4754-b5e0-3f03787e0bf4]

Error: exception while executing query: Failure while trying to get
next result batch. (state=,code=0)

Am I doing something wrong?

Thanks,
Daniel

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message