If you just want to run the query with the parameters like "alter session", you 
can write those session-altering SQL as the initial set of queries before the 
actual query in the same file.

Then run something like this:

/opt /drill/apache-drill-1.11.0/bin/sqlline -u "jdbc:drill:zk=local" --force 
true -f <queryFileName>

This opens a session, and runs all the queries (separated by a semi-colon). 

The force flag is meant for ensuring that in the event a query within the file 
fails, it will still continue to execute the following queries in the file.


-----Original Message-----
From: Divya Gehlot [mailto:[email protected]] 
Sent: Wednesday, August 02, 2017 7:30 PM
To: [email protected]
Subject: pass parameters to Drill query in file

Hi,
how to  pass parameters to Drill query in file?

Thanks,
Divya

Reply via email to