Roquettor
Roquettor is a basic command-line tool developped by Indexima that allows you to send queries in batch.
Download & Prerequisites
You can download the last version of Roquettor here.
Using Roquettor requires Java installed.
Basic usage
In order to use Roquettor, open a shell and execute java -jar roquettor-1.3.jar .
Please find below an example of running Roquettor to send queries to an Indexima cluster.
The required parameters are described in the Options section.
bash
java -jar roquettor-1.3.jar \
-url "jdbc:hive2://localhost:10000/default" \
-user "admin" \
-password "myPassword" \
-script "queries.sql" \
-threads 3Options
Name
Description
url
Define JDBC URL to the Indexima cluster
Example: "jdbc:hive2://sample.mydomain.com:10000/default;ssl=true"
Default: "jdbc:hive2://localhost:10000/default"
script
Set the queries scripts files to execute.
Comma-separated values of paths.
Query scripts are executed sequentially.
Example: -script "myScript_1.sql,myScript_2.sql"
threads
Define max concurrent connections.
If this value is higher than 1, queries contained in a script file are executed concurrently.
Default: 1
driverclass
Define the Driver Class to register.
Default: "org.apache.hive.jdbc.HiveDriver"
output
Define path to results directory.
Default: "output"
user
Define the user to authenticate.
Default: empty
password
Define the user's password.
Default: empty
timeout
Timeout in seconds: if the query lasts more than x sec, roquettor will cancel the query
Default: -1 (no timeout)
results
boolean to retrieve results or not
Default: true
repeat
Repeat execution plan as many times as specified
Default: 1
flushresults
Flush all query results to specified location
Default: empty (no flushing results)
INFO
If the script parameter contains several sql scripts (comma separated), thos scripts will be executed sequentially. If the threads parameter is more than 1, the queries inside each script will be executed concurrently.
INFO
Roquettor can also be used to query any JDBC server. To use Roquettor with another server, load the appropriate jdbc driver in your java command, and adapt the driver-class parameter.
Output
Roquettor will generate a file with the list of queries executed, their timestamp and if the query is in error.
This file will be generated in the repository defined by the output parameter.
If the results parameter is true, the output file will also contains the number of results for each queries.
If the flushresults parameter contains folder location, Roquettor will dump the results of each query to this location.
bash
query,resultCount,startTime,endTime,elapsed,error
"SELECT 123456789",0,1649855566069,1649855566151,82,NO