Re: Sqlline Tricks

2016-02-03 Thread Andries Engelbrecht
Try using an alias in .bash_profile or similar. Modify as needed, but this may help you. alias sqlline="/usr/bin/sqlline -u jdbc:drill:zk=drilldemo:5181" You can play with the user and password options, but they should work. --Andries > On Feb 3, 2016, at 1:53 PM, John Omernik

Re: Sqlline Tricks

2016-02-03 Thread Christopher Matta
The only way I know of getting sqlline to ask for a password is to run the !connect command after starting the shell: $ /opt/mapr/drill/drill-1.4.0/bin/sqlline apache drill 1.4.0 "a drill in the hand is better than two in the bush" sqlline> !connect jdbc:drill: scan complete in 427ms Enter

Re: Sqlline Tricks

2016-02-03 Thread Keys Botzum
Did you already open a JIRA on this? https://issues.apache.org/jira/browse/DRILL-3880 Keys ___ Keys Botzum Senior Principal Technologist kbot...@maprtech.com 443-718-0098 MapR Technologies http://www.mapr.com >

Re: Sqlline Tricks

2016-02-03 Thread Keys Botzum
They are different although interestingly I think some of this has been fixed per what others here have posted. If it were me I'd clarify/enhance the JIRA based on what you've just learned but others may feel differently. Keys ___ Keys Botzum Senior Principal

Re: Sqlline Tricks

2016-02-03 Thread Christopher Matta
How about this bash script I just whipped up for a workaround for now? #!/bin/bash USERNAME=$1 PASSWORD=$2 if [[ -z $USERNAME ]]; then echo "Please enter at least a username" exit 1 fi if [[ -z $PASSWORD ]]; then read -s -p "Enter Password for

Re: Sqlline Tricks

2016-02-03 Thread John Omernik
Ya, Andries, that's effectively what I did with my script, I passed the url with -u, but without the username and password provided on the command line, I get an auth error. If there truly is no way to ask for username/password when providing auth string, I may open a JIRA on that, I think it

Sqlline Tricks

2016-02-03 Thread John Omernik
Hey all, I am trying to "Ease" my users into using drill. One thing that I'd like to automate for them is the initial connection, basically, my zk string jdbc:drill:zk:zknode1:5181,zknode2:5181,zknode3:5181 Is a bit of pain, in addition, my users have to find sqlline, so what if I change

Re: Sqlline Tricks

2016-02-03 Thread John Omernik
LOL So I did. I saw them as two things. "Not putting the password at the command line" vs. Specifying the Connect string URL without user or pass and then getting prompted... but in reality they really are the same thing aren't they? On Wed, Feb 3, 2016 at 4:18 PM, Keys Botzum

UDF - BooleanHolder

2016-02-03 Thread Nicolas Paris
Hello, Hello, I would like to create a user defined function that would return a boolean value. Use case would be : SELECT * FROM x WHERE MyFunction(); I haven't found any BooleanHolder in order to. @Output BooleanHolder out; The only way I have is: SELECT * FROM x WHERE MyFunction()

Re: Sqlline Tricks

2016-02-03 Thread Ted Dunning
If you specify a file name on the sqlline command line, that file will be treated as a properties file which can specify user and password. An attacker could see the file name on the [ps ax] output, but they wouldn't be able to read the props file. If that file is deleted shortly after starting

Re: Sqlline Tricks

2016-02-03 Thread Christopher Matta
Good point about the ps, I can imagine a workaround using expect for now… I attempted to use heredoc but it didn’t really work: sqlline <<< '!connect jdbc:drill:' could not load a native library: netty-transport-native-epoll apache drill 1.4.0 "a drill is a terrible thing to waste" 0:

Re: UDF - BooleanHolder

2016-02-03 Thread Abdel Hakim Deneche
It's called BitHolder On Wed, Feb 3, 2016 at 3:12 PM, Nicolas Paris wrote: > Hello, > > Hello, > > I would like to create a user defined function that would return a boolean > value. > Use case would be : > > SELECT * FROM x WHERE MyFunction(); > > I haven't found any

Problem traversing a directory

2016-02-03 Thread John Darlington
I am a new user of Drill .. I have spent the last week obsessively watching every video I could find .. the technology is very exciting. I am particularly interested in using Drill over Azure Blob Store to read our Json Time Series Data. I have started working through the examples in the

Convert ISO 8601 string to timestamp

2016-02-03 Thread Christopher Matta
What’s the best way to convert this ISO 8601 timestamp to a drill timestamp type? Tried this: 0: jdbc:drill:> select to_timestamp('2016-01-08T15:00:15-05:00') from sys.version; Error: SYSTEM ERROR: DrillRuntimeException: Failure while materializing expression in constant expression evaluator

Re: Convert ISO 8601 string to timestamp

2016-02-03 Thread Stefán Baxter
Hi, This small UDF project contains a asTimestamp function that you may find useful: https://github.com/activitystream/asdrill It accepts multiple value types and returns them as timestamp. Feel free to do with it what you will :) Regards, -Stefán On Wed, Feb 3, 2016 at 6:22 PM, Jason