Hector: How to specify CQL version? - hector

I'd like to specify CQL Version when using Hector with Cassandra 1.1.5, specifically CQL 3.0.
How can I do that?
The answer to the question
How to use CQL 3.0 with JDBC drivers or Hector
was not useful.

For cassandra-jdbc, you can specify when creating the data source object.
CassandraDataSource cds = new CassandraDataSource(host, port, keyspace, user, password, "3.0.0")

Related

Accessing BigQuery via SQL Developer

I am new to Google's BigQuery (BQ). I am looking for a way to use SQL Developer (SD) as my primary GUI.
I have tried setting up a third party JDBC, but it does not seem to work. I downloaded Google's JDBC drivers for BQ and tried setting it up as a third party connection in SD. It registers, but does not show on the create new connection.
It is supposed to show up as a new Connection Type tab, but nothing is shown.
Is it possible to access BigQuery with SQL Developer? If so, can anyone provide me with the correct steps to duplicate?
Have you tried the Simba Driver? It provides not only JDBC, but ODBC (3.8 is supported) as well.
Alternatively you can check this documentation on how to Access BigQuery Data as a Remote Oracle Database.

Connect to Vertica from Datagrip

I'm using DataGrip and I'm kind of new in it. There is a case for me to connect to Vertica DB. As far as I know, there is no native provided driver for connection to that type of databases. What steps should I take to connect to it? Is there some driver to deal with?
Thanks!
You should be able to add the Vertica jdbc jar as a driver. Download it from the Vertica site, then:
Go to File / Data Sources
Right click somewhere and click Add / Driver
Give it a name
Select the jdbc jar file you downloaded
Set the class to com.vertica.jdbc.Driver
Dialect: PostgreSQL
As for how well this works, I'm not sure. It really depends on how DataGrip uses jdbc. But this is how you would add it.
In addition to #woot answer
I would add that when you setup the datasource connection to Vertica. Set the URL with below format.
URL: jdbc:vertica://{HOST}:{PORT}/{DB}

Configure SQuirrel SQL Client to work for DB2/AS400

I use the ancient System i Navigator (french) to get to query a DB2 (AS/400) database.
I liked to update the client and use a more fresh (and English) sql client for that database.
So, I installed the SQuirrel SQL client (3.5.0, the latest at day).
After the installation and launching, I discovered that the "IBM DB2 App Driver" is not "checked".
The message when I click on it says:
"Could not find class COM.ibm.db2.jdbc.app.DB2Driver in neither the
Java class path nor the Extra class path of the IBM DB2 App Driver
driver definition: java.lang.ClassNotFoundException:
COM.ibm.db2.jdbc.app.DB2Driver"
As I understood I need to copy a (universal?) JDBC driver in the SQuirrel "\lib" folder. How to get it?
I don't have any "classpath" defined in the environmental variables (I am on Windows 7 x64).
I am not a Java developer, so I am not sure if I need or not to configure that classpath to make work that sql client.
if it's an AS400, then you should use JTOpen libraries to connect.
http://jt400.sourceforge.net/
JT400 has the JARS you need to use. Note, the class name mentioned above is not the same as what is expected on the AS400....
I remember it being something like this....
com.ibm.as400.access.AS400JDBCDriver... you'll want to double check
if you start squirrel-sql on the commandline you can add this
set CLASSPATH=%CLASSPATH%;c:/jt400.jar
If want a really quick and easy "command-line" JDBC client, you can use the one included in the JTOpen. I use it all the time so I don't have to open yet another window.
Here is an example.
~> java -cp jt400.jar com.ibm.as400.access.jdbcClient.Main jdbc:as400:AS400 SYSTEM USERID PASSWORD
>select * from sysibm.sysdummy1
IBMREQD
Y

Set HSQLDB data type in hibernate configuration files?

I am trying to create an in-memory DB using HSQLDB 2.2.5. We are also using Hibernate. The problem is that our Domain Objects are annotated for Oracle. We generate the HBM files from the POJOs. Hence I am getting "type not found or user lack privileges: NUMBER" errors when I attempt to run against HSQLDB. HSQL 2.2.5 doesn't support NUMBER, only NUMERIC.
Is there any way in the hibernate configuration file or hibernate.properties to tell HSQL to treat NUMBER as NUMERIC?
Well, this version of HSQLDB supports the Oracle syntax compatibility and accepts MUMBER in this mode, plust many other Oracle-specific features. See the Guide for details.
http://hsqldb.org/doc/2.0/guide/deployment-chapt.html#N14266

Generic Command Line SQL Program?

Is there any application/project that provides you with a command line SQL client that will work with multiple databases and/or provides a mechanism for writing your own drivers?
Put another way, I'm looking for something like the mysql command line client or SQL*Plus for Oracle, but that's database agnostic.
All platforms welcome, but extra points for OS X/*nix approaches.
Try sqlsharp from the Mono subversion repository. You can define new providers via a configuration file. They are loaded from .NET assemblies, so you can write your own provider if you want to, but Mono already has MS SQL and Oracle, plus postgres and MySQL provide their own .NET assemblies.
It works on any platform supported by Mono and MS.NET.
Why not use something built on Perl and DBI like DBI-Shell?
a SQL client and front-end for multiple database is Crunchyfrog, which offers a Native Database Shell. Not sure if this meets your requriement