> > 0: jdbc:drill:zk=local> ALTER SYSTEM SET > `store.json.read_numbers_as_double` = true; > > *+-------+---------------------------------------------+**| ** ok ** | ** > summary * > * |* > *+-------+---------------------------------------------+**| *true * | > *store.json.read_numbers_as_double > updated. > * |* > *+-------+---------------------------------------------+*1 row selected > (0.075 seconds) >
> 0: jdbc:drill:zk=local> select t.properties.size from > dfs.`/Users/khahn/drill/apache-drill-1.1.0-SNAPSHOT/stefan.json` t; > > *+---------+**| **EXPR$0 * > * |* > *+---------+**| *1 > * |**| *2 > * |* > *+---------+*2 rows selected (0.096 seconds) http://drill.apache.org/docs/json-data-model/ has more examples than the doc page you might be using. Kristine Hahn Sr. Technical Writer 415-497-8107 @krishahn On Sun, Jul 12, 2015 at 1:41 PM, Stefán Baxter <[email protected]> wrote: > Hi, > > I'm continuing my Drill discovery and trying to build queries against some > of the data we have. > > Our analytics data is a flat structure and I have had no issues working > with that (apart from parsing dates and dates being stored a binary (more > on this later)) > > Now I'm just trying to discover if we can use drill for more generic JSON > processing but nested data structures are giving me hard times. > > Can someone please tell me how to query the following structure for type, > properties.size > [ > > { > "timestamp": "2015-03-31 14:40:53.276", > "action": "some.category.action", > "origin": "www.some.domain", > "properties": { > "task_type": "Diagnostic", > "size": "1" > } > }, > { > "timestamp": "2015-03-31 14:40:53.277", > "action": "some.category.action", > "origin": "www.some.domain", > "properties": { > "task_type": "Diagnostic", > "size": 2, > "color": "blue" > } > } > ] > > * this data is factitious and is purely created for these tests. > > These entries have no unique ids (as the donuts document example). > > Regards, > -Stefan >
