Re: Speed Up Drill

2016-08-30 Thread Magnus Pierre
Hello Sanjiv, It is a simple select with no filters or conditions and a few casts going against a database table. Can’t see how it could be possible to improve the query. Drill will ask for the whole table.Are you accessing the data directly in Drill through the cmd-line or using the web-ui or

Querying Delimited Sequence file

2016-08-30 Thread Robin Moffatt
Hi, I'm trying to read a sequence file, in which the key is null and the value holds multiple columns [1], delimited by \x01. In Hive I simply define it as : CREATE EXTERNAL TABLE foo (col1 string, col2 string, col3 timestamp) ROW FORMAT DELIMITED STORED as sequencefile LOCATION '/user/oracle/foo

Re: Querying Delimited Sequence file

2016-08-30 Thread Zelaine Fong
If the column is delimited by some character, you can use the SPLIT() function to separate the value into an array of values. You can then use the FLATTEN() function to separate the array of values into individual records. E.g., if your column has the value "a:b", where your delimiter is ":", you

ApacheCon Seville CFP closes September 9th

2016-08-30 Thread Rich Bowen
It's traditional. We wait for the last minute to get our talk proposals in for conferences. Well, the last minute has arrived. The CFP for ApacheCon Seville closes on September 9th, which is less than 2 weeks away. It's time to get your talks in, so that we can make this the best ApacheCon yet. I

Re: Querying Delimited Sequence file

2016-08-30 Thread Robin Moffatt
Hi, Thanks - I think SPLIT gets me some of the way, but after the FLATTEN I want to PIVOT, so instead of : 0: jdbc:drill:zk=cdh57-01-node-01.moffatt.me:> select flatten(split(version,'.')) from sys.version; +-+ | EXPR$0 | +-+ | 1 | | 7 | | 0 | +-+ I'd g

Re: Querying Delimited Sequence file

2016-08-30 Thread rahul challapalli
You should be able to use split_part function (I haven't tried it myself...but it is supported). With this function you can extract individual columns. Unfortunately I couldn't find the documentation for this function as well. But it should be similar to how other databases implement this function.

Re: Querying Delimited Sequence file

2016-08-30 Thread rahul challapalli
Also you can refer to [1] for the list of string functions implemented. [1] https://github.com/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/StringFunctions.java On Tue, Aug 30, 2016 at 11:06 AM, rahul challapalli < challapallira...@gmail.com> wrote: >