You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by George Spofford <ge...@gmail.com> on 2015/07/08 03:20:38 UTC

Newcomer, getting error querying sample data from MongoDB while verifying setup

Hi, and thanks for understanding if I'm making some rookie mistakes here.
My top-level message is that I get the following error while querying from
MongoDB's sample database using Drill 1.2 (pulled and built this afternoon):

0: jdbc:drill:zk=local> select * from mongo.test.restaurants ;
Error: DATA_READ ERROR: Failure while reading ExtendedJSON typed value.
Expected a VALUE_STRING but received a token of
type VALUE_NUMBER_INT
 at [Source: org.apache.drill.exec.vector.complex.fn.SeekableBAIS@22692b36;
line: 1, column: 223]

Line  1
Column  224
Field  date
Fragment 0:0

I have loaded and successfully queried some data of my own from MongoDB
thru Drill, after enabling the Mongo storage plugin via the web client, so
I'm satisfied that the systems talk to each other. Often, sample databases
are frequently exercised so I thought this would be a tested/supported case.

Platform particulars:


   - Windows7 Pro SP1 x64, 16GB RAM
   - Drill 1.2 master (commit 48d8a59d1b97988c006f85daad0ae2fcb3a9cd06)
   - Built with JDK 1.7.0_55
   - Running under JDK 1.8.0_45
   - MongoDB v3.0.4 (downloaded and installed today  not built from source)


The mongo database was loaded via the instructions found at
https://docs.mongodb.org/getting-started/shell/import-data/

Apologies that my first message to this group was an issue. With a little
more setup and digging, I might be able to fix it myself.

Thanks,

George Spofford

Re: Newcomer, getting error querying sample data from MongoDB while verifying setup

Posted by Jacques Nadeau <ja...@apache.org>.
This is due to an incompatibility with certain types of json extended types
in Mongo when compared to Drill.  You need to use strictly JSON types in
Mongo to use the current adapter.  There is a JIRA (DRILL-2879) to add
better support for everything that Mongo supports.

You probably need to work with a different data set or not select columns
that use extended json types.



On Tue, Jul 7, 2015 at 6:20 PM, George Spofford <ge...@gmail.com>
wrote:

> Hi, and thanks for understanding if I'm making some rookie mistakes here.
> My top-level message is that I get the following error while querying from
> MongoDB's sample database using Drill 1.2 (pulled and built this
> afternoon):
>
> 0: jdbc:drill:zk=local> select * from mongo.test.restaurants ;
> Error: DATA_READ ERROR: Failure while reading ExtendedJSON typed value.
> Expected a VALUE_STRING but received a token of
> type VALUE_NUMBER_INT
>  at [Source: org.apache.drill.exec.vector.complex.fn.SeekableBAIS@22692b36
> ;
> line: 1, column: 223]
>
> Line  1
> Column  224
> Field  date
> Fragment 0:0
>
> I have loaded and successfully queried some data of my own from MongoDB
> thru Drill, after enabling the Mongo storage plugin via the web client, so
> I'm satisfied that the systems talk to each other. Often, sample databases
> are frequently exercised so I thought this would be a tested/supported
> case.
>
> Platform particulars:
>
>
>    - Windows7 Pro SP1 x64, 16GB RAM
>    - Drill 1.2 master (commit 48d8a59d1b97988c006f85daad0ae2fcb3a9cd06)
>    - Built with JDK 1.7.0_55
>    - Running under JDK 1.8.0_45
>    - MongoDB v3.0.4 (downloaded and installed today  not built from source)
>
>
> The mongo database was loaded via the instructions found at
> https://docs.mongodb.org/getting-started/shell/import-data/
>
> Apologies that my first message to this group was an issue. With a little
> more setup and digging, I might be able to fix it myself.
>
> Thanks,
>
> George Spofford
>