You can test ODBC on your Ryft Elasticsearch and Ryft Toolkit instance using the Ryft-provided sample databases. Once downloaded and installed on your instance, you can connect to the SQL server on your instance using the built-in iSQL client and run some example queries. Access the SQL server with the "admin" ID and the password provided in the SSH session.
Download Sample Database for Testing ODBC
You can download a tar ball of sample databases to use for testing ODBC/JDBC. The tar ball includes these sample databases:
- Chicago Crime
From the "ryft-public-sample-data" folder, click the ODBC folder name to see the list of files. The file you want is "SampleDatabases.tar.gz" as shown here:
To download, untar and then use the "SampleDatabases.tar.gz" you must execute these steps from an SSH session. This will get the tar file, untar the file and install three data files:
$ wget https://s3.amazonaws.com/ryft-public-sample-data/ODBC/SampleDatabases.tar.gz
$ tar xvzf SampleDatabases.tar.gz
$ cp -rf ODBC /ryftone
$ ls /ryftone/ODBC/
Chicago_Crime Passengers Seuss
You can now connect to the SQL server using the built-in iSQL client, and run some sample queries.
You can now connect to the SQL server using the built in iSQL client and run some sample queries, as these images show. Password is the same as the one provided in your SSH session.
Connect to isql and issue the help command, like this:
SQL> select * from Seuss_Books where "Format.Hardcover" like 'Y'
SQL> select * from Passengers where Name like '-H2(Michelle)'
SQL> select * from Chicago_Crime where Description LIKE '%ELECTRONIC%' and Block LIKE '%INDIANA%'
The ODBC/JDBC server is called "ryftodbc" on your instance. You can easily start and stop the server from the command line.
Start the ODBC/JDBC server
$ sudo service ryftodbcd start
Stop the ODBC/JDBC server
$ sudo service ryftodbcd stop
Status of the ODBC/JDBC server
$ sudo service ryftodbcd status
The ODBC/JDBC server log file, "ryftone_server.log" is located in the "/var/log/ryft/" directory and contains information for logging levels above 0. The maximum file size is 200MB so once the log file is full, another log file is created. A total of 6 log files can exist at any time; only the 6 most recent log files are kept on the sever. It "rolls" the log files so that the oldest file is deleted when a new file is created.
The first file is "ryftone_server.log" and subsequent files are numbered "ryfton_serverX.log" where X = 1 to 5.
Here is sample output of the log file: