Skip to main content
Skip table of contents

Roquettor

Roquettor is a non-official Indexima command-line tool that allows you to send queries in batch.

Download

You can be downloaded here.

Basic usage

Set the JDBC URL:

BASH
-url "jdbc:hive2://<url_jdbc_to_indexima>/"

To execute a pool:

BASH
-script "myScript.sql"

To execute many pools:

BASH
-script "myQueries_1.sql,myQueries_2.sql"

Example

We are going to create a table, insert data, and execute a few select statements.
Let's create these scripts.

SQL
# create_table.sql
CREATE TABLE myTable ( country STRING, population INT, INDEX(country));

# insert_into.sql
INSERT INTO TABLE myTable VALUES ('France', 66000000);
INSERT INTO TABLE myTable VALUES ('Italy', 60000000);
INSERT INTO TABLE myTable VALUES ('England', 55000000);
INSERT INTO TABLE myTable VALUES ('United-States', 327000000);
INSERT INTO TABLE myTable VALUES ('Spain', 48000000);

# select_from.sql
SELECT country, population FROM myTable;
SELECT COUNT(country) FROM myTable;
SELECT AVG(population) FROM myTable;


Here, we'll execute the three queries scripts sequentially.
Queries inside each script will be executed in concurrence.

BASH
java -jar roquettor-1-1.jar
-url "jdbc:hive2://localhost:10000/default"
-user "admin"
-password "myPassword"
-script "create_table.sql,insert_into.sql,select_from.sql"
-threads 3

Options

NameDescription
URL

Define JDBC URL to Indexima.
Default: "jdbc:hive2://localhost:10000/default"

script

Set the queries script 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 the script files can be executed concurrently.
Default: 1

driver-class

Define the Driver Class to register.
Default: "org.apache.hive.jdbc.HiveDriver"

output

Define path to results directory.
Default: "output"

userDefine the user who execute queries.
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

results

boolean to retrieve results or not

JavaScript errors detected

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

If this problem persists, please contact our support.