Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Drill >> mail # dev >> sqlline

Here's the sqlline script I forgot to check in:

# sqlline - Script to launch SQL shell
# Example:
# $ ./sqlline
# sqlline> !connect jdbc:optiq:model=common/target/test-classes/donuts-model.json admin admin

# Build classpath on first call. (To force rebuild, remove .classpath.txt.)
if [ ! -f .classpath.txt ]; then
    (cd sqlparser; mvn dependency:build-classpath -Dmdep.outputFile=../.classpath.txt)
    find . -type d -name classes |awk 'BEGIN {ORS=":"} {print}' >> .classpath.txt

exec java -cp "$(cat .classpath.txt)" sqlline.SqlLine "$@"

# End sqlline