incubator-drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mufy <mufeed.us...@gmail.com>
Subject Re: Querying JSON files on HDFS
Date Wed, 29 Oct 2014 14:44:06 GMT
You'll need to create a storage plugin for JSON as,

{
"type": "file",
"enabled": true,
"connection": "hdfs:///",
"workspaces": {
"root": {
"location": "/",
"writable": false,
"storageformat": "json"
}
},
"formats": {
"json": {
"type": "json"
}
}
}

And you should be able to query the file as shown below,

select count(1) from json.root.`sample.json`;


Where sample.json will be your file on the HDFS.





---
Mufeed Usman
My LinkedIn <http://www.linkedin.com/pub/mufeed-usman/28/254/400> | My
Social Cause <http://www.vision2016.org.in/> | My Blogs : LiveJournal
<http://mufeed.livejournal.com>




On Wed, Oct 29, 2014 at 8:09 PM, Daniel Haviv <danielrulez@gmail.com> wrote:

> Hi,
> I can't find a tutorial explaining how to get started with Drill (besides
> querying the sample data that comes with Drill).
>
> I have some json data on HDFS that I would like to query, how do I query
> these files ?
> I know I need to do some configuration for Drill to know HDFS there is no
> info about how to..
>
> Thanks,
> Daniel
>

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