Dears,

We are using Drill 1.8.0 over MongoDB 3.2.10.

Here we are accessing json data  (using JDBC connection via Squirrel).

For Simple json dataset:

[cid:[email protected]]

Accessing using Squirrel:

[cid:[email protected]]

For Complex json data:

{
    "_id" : " some_value ",
    "_updated" : " some_value ",
    "brands" : [
        " some_value "
    ],
    "_created" : " some_value ",
    "_status" : " some_value ",
    "metadata" : {
        "username" : [
            {
                "site_id" : " some_value "
            }
        ],
        "status" : [



Query like "select * from mongo.test.`member`;"
gives error "Error: SYSTEM ERROR: IllegalArgumentException: You tried to write 
a Float8 type when you are using a ValueWriter of type 
NullableVarCharWriterImpl."

For selected first level of columns, it runs successfully

Our Query:

How do we access fields from complex json object in drill??

Accessing "site_id" under "username":

I did google and found this approach

Tried: " select _id, _updated, brands[0], _created, _status, 
metadata.username[0].site_id from mongo.test.`member` "

Gives error: "Error: PARSE ERROR: Encountered ", metadata" at line 1, column 51"
This e-mail and any attachments are confidential and intended solely for the 
addressee and may also be privileged or exempt from disclosure under applicable 
law. If you are not the addressee, or have received this e-mail in error, 
please notify the sender immediately, delete it from your system and do not 
copy, disclose or otherwise act upon any part of this e-mail or its 
attachments. Internet e-mails are not necessarily secure and are susceptible to 
change. InfoCepts does not accept responsibility for changes made to this 
message after it was sent. Whilst all reasonable care has been taken to avoid 
the transmission of viruses, it is the responsibility of the recipient to 
ensure that the onward transmission, opening or use of this message and any 
attachments will not adversely affect its systems or data. No responsibility is 
accepted by InfoCepts in this regard and the recipient should carry out such 
virus and other checks as it considers appropriate. InfoCepts does not also 
accept responsibility for the improper or incomplete transmission of the 
information contained in this communication nor for any delay in its receipt or 
damage to your system and does not guarantee that the integrity of this 
communication has been maintained. Replies to this e-mail may be monitored by 
InfoCepts for operational or business reasons.

Reply via email to