drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dechang Gu <...@maprtech.com>
Subject Re: Query execution in Drill
Date Fri, 03 Jun 2016 14:56:22 GMT
On Fri, Jun 3, 2016 at 7:41 AM, Sebastian Hamann <drvmmen@web.de> wrote:

> Hi,
> Iam currently trying to write a shell script to automatically setup drill
> (embedded for now) and execute queries on it.
> 1. Is there an option to execute SQL from command line or file, like in
> Hive?
> (I mean the hive -e 'sql statement' or hive -f <filename>)
Yes,  you can use "-f <query file>" on the command line to run the query
from shell. E.g.,
sqlline -u "jdbc:drill:zk=local" -f q1.sql

where q1.sql the a file containing the sql statements to be executed.


> 2. If not: What is a good way to simulate such behaviour? Based on an idea
> of mine: Is there maybe a way to start drill without starting the drill
> prompt so that I can send queries through the rest API in the same script?
> I have looked throught he archives and google and still could not find an
> easy solution for this.
> Thanks in advance!

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