Well, if it's json then you do know the field names, they are right there
in the document

On Mon, Oct 12, 2015 at 1:25 PM, John Omernik <j...@omernik.com> wrote:

> Interesting, so we can't use select * on those items.  I think that should
> be a bug of some sort in that it's hard to explore the json data if you
> don't know the field names ahead of time. This is one of the situations
> where having the select * works really well for learning the data. (Am I
> missing something here?)
>
>
>
> On Mon, Oct 12, 2015 at 12:13 PM, Abhishek Girish <
> abhishek.gir...@gmail.com
> > wrote:
>
> > I tried out using the example you shared. Saw the same failures. However,
> > this worked for me:
> >
> > > select `hello.yoko`, yousayyes from dfs.`/Users/agirish/abc.json`;
> > +-------------+------------+
> > | hello.yoko  | yousayyes  |
> > +-------------+------------+
> > | goodbye     | isayno     |
> > +-------------+------------+
> > 1 row selected (0.092 seconds)
> >
> > Basically, instead of a select * I used select <columnName> and escaped
> the
> > column using back quotes. See if this can work for you. I'm not sure if
> > there is an alternate way - someone else can comment.
> >
> > -Abhishek
> >
> >
> > On Mon, Oct 12, 2015 at 9:45 AM, John Omernik <j...@omernik.com> wrote:
> >
> > > I am getting some data that seems well formed, except for there are
> dots
> > in
> > > some of the key names.
> > >
> > > Basically, something like ip.src seems to be making it fail with a
> "Field
> > > References must be singular names"
> > >
> > > I am using the MapR Packaged Drill 1.2.
> > >
> > >
> > > I can prove this out with
> > >
> > > {"hello":"goodbye", "yousayyes":"isayno"}
> > >
> > > works fine but
> > >
> > > {"hello.yoko":"goodbye", "yousayyes":"isayno"}
> > >
> > > Screams loudly that there is a failure.
> > >
> > > Is there a way we could handle dots in the key name on JSON?
> > >
> > > John
> > >
> >
>



-- 
----------------------------------
Paul Ilechko
Senior Systems Engineer
MapR Technologies
908 331 2207

Reply via email to