Also see this thread https://community.mapr.com/thread/10255 <https://community.mapr.com/thread/10255>
--Andries > On Jun 3, 2016, at 8:22 AM, Shankar Mane <[email protected]> wrote: > > You can use the following: > > $DRILL_HOME/bin/drill-conf --force=true -f filename.sql > > Where > --force=true : Continue even after there is an error in sql query. This is > useful where you do: drop table t1 and create table t1. > > -f : path to sql file. > > You can check for more options using: > $DRILL_HOME/bin/drill-conf --help > > > On 3 Jun 2016 20:26, "Dechang Gu" <[email protected]> wrote: > >> On Fri, Jun 3, 2016 at 7:41 AM, Sebastian Hamann <[email protected]> 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. >> >> >> -Dechang >> >> >>> 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! >>> >>
