drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abhishek Girish <abhishek.gir...@gmail.com>
Subject Re: Querying nested data
Date Thu, 21 May 2015 14:04:40 GMT
Hey Patrick,

It looks like there was a scheme change across records. Going by the error
message, it looks like Drill first encountered a value of type float8 and
expected the remainder of records to also have values of type float8 for
that field. But it then encountered a value of type BigInt.

Can you try switching on JSON All Text Mode and rerun the query? This would
treat all values at Strings and you could then use casts to convert
specific fields to the corresponding data types, if required.
       > alter session set `store.json.all_text_mode` = true;


On Thursday, May 21, 2015, Patrick Grandjean <p.r.grandjean@gmail.com>

> I am following the "Getting Started" guide. I could initialize drill in
> embedded mode and execute a query on the sample employee.json, which
> returned what was expected.
> I then tried querying a more complex JSON with more nested data, by using
> sales_transactions.json:
> 0: jdbc:drill:zk=local> select customer_transactions[0].product_name from
> cp.`sales_transactions.json`;
> Error: DATA_READ ERROR: You tried to write a BigInt type when you are using
> a ValueWriter of type NullableFloat8WriterImpl.
> File  /sales_transactions.json
> Record  129
> Line  129
> Column  728
> Field  store_sales
> Fragment 0:0
> [Error Id: 15b6c541-d35e-421b-b307-32d32cc4ce6c on
> debian.localdomain.local:31010] (state=,code=0)
> Could you please let me know what I am doing wrong?
> Using the lastest drill 1.0
> Patrick.

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