Skip to main content
Skip table of contents

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 3

Options

NameDescription
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"

userDefine 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

repeatRepeat execution plan as many times as specified
Default: 1
flushresultsFlush all query results to specified location
Default: empty (no flushing results)
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.
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.

Sample of output file

BASH
query,resultCount,startTime,endTime,elapsed,error
"SELECT 123456789",0,1649855566069,1649855566151,82,NO
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.