Re: Convert UTC to specific timezone?

2015-03-30 Thread Andries Engelbrecht
Here is the syntax for I could figure out for timezone. select to_timestamp('2015-03-30 20:49:59.0 UTC', '-MM-dd HH:mm:ss.s z') as Original, to_char(to_timestamp('2015-03-30 20:49:59.0 UTC', '-MM-dd HH:mm:ss.s z'), 'z') as New_TZ from sys.version; +++ | Original

Re: Convert UTC to specific timezone?

2015-03-30 Thread Mehant Baid
Currently in Drill there isn't support for 'timestamp with time zone' data type, all the timestamp/date information is stored in UTC and no timezone information is maintained, so AFAIK there isn't really a way to convert dates/timestamp to a specific timezone. However if your input data contain

Re: Question on SQL over CSV

2015-03-30 Thread Steven Phillips
How big is the data set? Is it just a single file, or multiple? And how long is it taking? It does not have to read the entire file to produce output. I suspect it's taking a long time to set up the query. On Mon, Mar 30, 2015 at 3:39 PM, Ganesha Muthuraman wrote: > I see that for a large data

Question on SQL over CSV

2015-03-30 Thread Ganesha Muthuraman
I see that for a large data set ( in my case a large CSV ), even a LIMIT 5 type of SQL take a very long time. Is it that Drill has to read through the entire file to produce any output even if I just want, say the first 10 lines of the file? Is there a way to let Drill stream the results back a

Convert UTC to specific timezone?

2015-03-30 Thread Christopher Matta
I have a column that’s UTC, how can I convert this column to a specific timezone? > select to_timestamp(columns[13], '-MM-dd HH:mm:ss') as `datetime_utc` > from `weather/2012` limit 10; +--+ | datetime_utc | +--+ | 2012-02-01 05:54:00.0 | | 2012-02-01 06:54:00.0 | | 2

Re: what does store.json.all_text_mode do?

2015-03-30 Thread Vince Gonzalez
Thanks - I knew that - I was trying to understand better what was going on under the hood. Kristine's link got me what I needed. On Mon, Mar 30, 2015 at 1:48 PM, Sudhakar Thota wrote: > Vince, > > Can you try doing this again and query one more time. > > alter system set `store.json.all_text_mod

Re: what does store.json.all_text_mode do?

2015-03-30 Thread Sudhakar Thota
Vince, Can you try doing this again and query one more time. alter system set `store.json.all_text_mode` = true I used your file on sandbox and queried. It is working. 0: jdbc:drill:> select * from sys.options where name like '%all_text%'; +++++--

Re: what does store.json.all_text_mode do?

2015-03-30 Thread Vince Gonzalez
Great doc Kristine, thanks! On Mon, Mar 30, 2015 at 11:06 AM, Kristine Hahn wrote: > When you set all_text_mode to true, Drill reads all data from the JSON > files as VARCHAR. After reading the data, use a SELECT statement in Drill > to cast data as follows: > > * Cast JSON numeric values to [SQ

Re: what does store.json.all_text_mode do?

2015-03-30 Thread Kristine Hahn
When you set all_text_mode to true, Drill reads all data from the JSON files as VARCHAR. After reading the data, use a SELECT statement in Drill to cast data as follows: * Cast JSON numeric values to [SQL types](/docs/data-types), such as BIGINT, DECIMAL, FLOAT, and INTEGER. * Cast JSON strings to

what does store.json.all_text_mode do?

2015-03-30 Thread Vince Gonzalez
My guess is that setting store.json.all_text_mode = True effectively tells Drill not to skip inferrering the type of the columns, which perhaps avoids any complications due to a change in schema that confuses things (in this case from Float8 to null)? But I am not confident I understand what's rea