Re: Error using sum on numeric data -- Only COUNT aggregate function supported for Boolean type

2015-02-08 Thread Andries Engelbrecht
You can can eliminate the header row with a predicate. Also Drill will try to guess the data type of columns, but sometimes it may be wrong. In this case the header row can confuse Drill as to the data type of the column as the first column has a string, and the next ones have a number. In such

Re: Error using sum on numeric data -- Only COUNT aggregate function supported for Boolean type

2015-02-08 Thread Minnow Noir
That works with the file that has no row header, Sudhakar. On Sun, Feb 8, 2015 at 10:34 PM, Sudhakar Thota wrote: > May be you have to cast it to integer. > > Sudhakar Thota > Sent from my iPhone > > > On Feb 8, 2015, at 6:54 PM, Minnow Noir wrote: > > > > The error actually happens when I remo

Re: Error using sum on numeric data -- Only COUNT aggregate function supported for Boolean type

2015-02-08 Thread Sudhakar Thota
May be you have to cast it to integer. Sudhakar Thota Sent from my iPhone > On Feb 8, 2015, at 6:54 PM, Minnow Noir wrote: > > The error actually happens when I remove the header row from the file. > > cat test2.csv > "Ed",100 > "Pete",200 > "Ed",100 > "Pete",400 > > > 0: jdbc:drill:zk=local

Re: Error using sum on numeric data -- Only COUNT aggregate function supported for Boolean type

2015-02-08 Thread Minnow Noir
The error actually happens when I remove the header row from the file. cat test2.csv "Ed",100 "Pete",200 "Ed",100 "Pete",400 0: jdbc:drill:zk=local> select columns[0], columns[1] from dfs.`/data/test2.csv`; +++ | EXPR$0 | EXPR$1 | +++ | "Ed

Re: Error using sum on numeric data -- Only COUNT aggregate function supported for Boolean type

2015-02-08 Thread Andries Engelbrecht
You need to filter out the header line on the CSV file as you are trying to sum a string in column1. —Andries On Feb 8, 2015, at 6:12 PM, Minnow Noir wrote: > I'm trying to perform a basic query in order to learn Drill, but getting an > the error message in the subject line. > > I created a

Error using sum on numeric data -- Only COUNT aggregate function supported for Boolean type

2015-02-08 Thread Minnow Noir
I'm trying to perform a basic query in order to learn Drill, but getting an the error message in the subject line. I created a dead simple CSV file on disk. Note that Sales values are not quoted. cat test.csv Employee,Sales Ed,100 Pete,200 Ed,100 Pete,400 When I query it without performing a s

Re: Connect to drillbit in VM from desktop Squirrel?

2015-02-08 Thread Andries Engelbrecht
On the HDP try to connect Drill to the ZK and then use the Squirrel JDBC instructions. Basically edit the /conf/drill-overrride.conf file Take note of the cluster-id in the conf file (as you will use that to connect to). Then edit the zk.connect line for the node name with ZK on it. Also with

Re: Connect to drillbit in VM from desktop Squirrel?

2015-02-08 Thread Jacques Nadeau
You can run in embedded mode within Squirrel but you would need to use the same classpath that the drillbit startup creates for your driver rather than using the jdbc-driver jar (the jdbc-driver jar doesn't support embedded mode). Once started in embedded, the web interface will be available. On

Re: Getting query result data out -- non-interactive querying?

2015-02-08 Thread Minnow Noir
Thanks Andries (and also, Aditya). I will try that. On Sun, Feb 8, 2015 at 5:50 PM, Andries Engelbrecht < aengelbre...@maprtech.com> wrote: > CTAS (Create Table As) is the way to get a CSV output. Make sure you point > to the correct directory and storage plugin configuration. > > Also to the be

Re: Querying multiple TSV or CSV files at once?

2015-02-08 Thread Minnow Noir
Thanks, Kristine. Those are some helpful pointers. On Sun, Feb 8, 2015 at 4:50 PM, Kristine Hahn wrote: > I sent the attachment to you in a private email. I think the problem is > that you need to specify the workspace, as shown below. Also included below > is a portion of the steps for queryin

Re: Connect to drillbit in VM from desktop Squirrel?

2015-02-08 Thread Minnow Noir
Embedded mode, since I'm just experimenting with it. I had it on another HDP sandbox VM a couple of months ago, and IIRC, was able to access the web UI from the host (unlike right now), but I never tried accessing it via a thick client from the host. I'm using the HDP 2.2 sandbox VM. ZK is on i

Re: Getting query result data out -- non-interactive querying?

2015-02-08 Thread Andries Engelbrecht
CTAS (Create Table As) is the way to get a CSV output. Make sure you point to the correct directory and storage plugin configuration. Also to the best way to ensure you get the CSV output file is set the session setting for output to CSV. I.e. alter session set `store.format` = ‘csv’; As an F

Re: Connect to drillbit in VM from desktop Squirrel?

2015-02-08 Thread Andries Engelbrecht
Are you running Drill in embedded mode or using the Sandbox VM? I don’t believe you can connect to a VM running Drill in Embedded mode from the host using SquirreL with JDBC. JDBC connects via ZooKeeper. It may be best to consider using the Drill SandBox if you would like to use SQuirreL, What

Re: Querying multiple TSV or CSV files at once?

2015-02-08 Thread Kristine Hahn
I sent the attachment to you in a private email. I think the problem is that you need to specify the workspace, as shown below. Also included below is a portion of the steps for querying multiple files in a directory. Connect to and Query a File When querying the same data source repeatedly, avoi

Re: Querying multiple TSV or CSV files at once?

2015-02-08 Thread Minnow Noir
Thanks for confirming that I should be able to query multiple files, Kristine. Your attachment didn't make it through. Was my syntax off, or do I have another problem? On Sun, Feb 8, 2015 at 4:00 PM, Kristine Hahn wrote: > Minnow, a single-query of multiple TSV files works for me. Here's how: >

Re: Querying multiple TSV or CSV files at once?

2015-02-08 Thread Kristine Hahn
Minnow, a single-query of multiple TSV files works for me. Here's how: "Query Multiple Files in a Directory" at the end of the attached PDF. Please overlook the code formatting and some links that didn't copy/paste well. On Sun, Feb 8, 2015 at 12:35 PM, Minnow Noir wrote: > "Failure while runnin

Re: Querying multiple TSV or CSV files at once?

2015-02-08 Thread Minnow Noir
"Failure while running fragment." Here's an example doing it the way you suggest. (Last 100 lines of sqlline.log are also attached.) It sounds like you think the multi-file query should actually work? Thanks 0: jdbc:drill:zk=local> select * from dfs.`/data` limit 5; ++ | column

Re: Getting query result data out -- non-interactive querying?

2015-02-08 Thread Aditya
Please see https://cwiki.apache.org/confluence/display/DRILL/CREATE+TABLE+AS+%28CTAS%29+Command On Sun, Feb 8, 2015 at 10:47 AM, Minnow Noir wrote: > I'm trying to extract query results as CSV for ingestion into another > tool. There's no obvious way in sqlline, the web UI, or the docs to > ext

Connect to drillbit in VM from desktop Squirrel?

2015-02-08 Thread Minnow Noir
I am trying to access a drill bit running in a VM from Squirrel on my desktop. I'm unsure of the Squirrel alias syntax, and having an issue troubleshooting because I can't access the web interface on 8047 in the VM. I'm trying this on a VM before worrying about deploying it into a real cluster.

Re: Querying multiple TSV or CSV files at once?

2015-02-08 Thread Neeraja Rentachintala
What is the error that you are seeing? Can you simply point it to the directory (without *.csv) to see if it helps. On Sun, Feb 8, 2015 at 10:33 AM, Minnow Noir wrote: > I'm trying to do ad-hoc exploration/analysis over multiple files without > having to concatenate them. New files show up on

Getting query result data out -- non-interactive querying?

2015-02-08 Thread Minnow Noir
I'm trying to extract query results as CSV for ingestion into another tool. There's no obvious way in sqlline, the web UI, or the docs to extract query results as CSV (or other formats). sqlline ./test.sql > output.csv doesn't work. Is there a way to pass sqlline a query file and then dump the ou

Querying multiple TSV or CSV files at once?

2015-02-08 Thread Minnow Noir
I'm trying to do ad-hoc exploration/analysis over multiple files without having to concatenate them. New files show up on a regular basis, and creating large, redundant concatenated files seems inelegant for data exploration. I've tried the obvious (... from dfs.`/dir/*.csv` but that only returns