Connecting cassandra to Tableau Software - odbc

I want to connect Tableau software to my cassandra database. Note that i'm using tableau in windows7 and cassandra in ubuntu (Virtual machine).
For this i've installed the Cassandra ODBC (and Simba cassandra ODBC but i got the same problem). I got a connexion succes and i found my keyspace but not my tables !!!!!!
But no table in "cim" keyspace !!
Note that in my keyspace "cim" i have 3 tables that i can request with any problem in cassandra. Is there something i should do before creating the ODBC driver ???
Thank you for your help

The ODBC driver as it stands currently uses thrift so won't be able to communicate directly with cql3 to display the table names. Describe commands also won't work. However, you should still be able to select data from your tables. Updates to the ODBC driver should provide cql3 support at some point in the new year.

Update Simba ODBC driver for Cassandra supports CQL3 and solves your problem.
http://www.simba.com/connectors/apache-cassandra-odbc

Related

Connecting to an Azure SQL Server Data Warehouse from R on a Mac - See random names instead of tables

I'm trying to connect to an Azure SQL Server (12.00.1900) from R on a Mac, using Microsoft's unixodbc SQL Server drivers (17).
I get a connection, but instead of seeing the 12 or so tables that live in the database, dbListTables returns 442 tables, all with nonsensical names, beginning with 'Csoe', 'Ote', and ending in 'xlshm_idad'. Instead of seeing the single schema that lives in the database, I see cin_1mro__e, IFRAINSHM, and s, none of which have any tables in them.
Note that when I use an ordinary SQL visualization app, that doesn't use the MS drivers, I'm able to see the tables and their content properly.
In addition, the RSQLServer package gets a working connection and sees the tables correctly, but isn't compatible with dplyr semantics.
Can anyone help or advise? I've looked for third party SQL Server unixodbc drivers for Mac, and I can't find any.
Until I see more info from OP, I'll leave as my answer the general recommendation to use R's odbc package. Assuming the correct drivers are installed, connection is configured correctly in odbc.ini, and assuming trusted_connection=yes is used in the same, then connecting from R is as simple as:
library(odbc)
dbConn <- dbConnect(odbc(), dsn = "myDSN")
if trusted connection is not on then you just need to pass uid and pwd arguments.
Also, it may be the case OP that you did not install freeTDS, so try (replace with equivalent for package manager you're using):
brew install freetds --with-unixodbc
This gives you the libtdsodbc.so driver. Make sure the DSN points to this.

RCassandra is not connecting to Cassandra Database

I'm new to Cassandra and R. When I'm connecting to Cassandra database using RCassandra package, connection is establishing. But When trying to use any keyspace, R is not responding. I used the following statements.
c <- RC.connect('192.168.1.20', 9042)
RC.use(c, 'effesensors')
Please give me a brief idea about how to use RCassandra to avoid this problem.
Are you aware that you may be using a non default port for Cassandra? If you can provide the Cassandra version and RStudio version I may be able to update my answer. I found this tutorial by tarkalabs useful as a checklist of steps to take before any connection is attempted.
From the tutorial,
Now connect to your database with connect.handle <-
RC.connect(host="127.0.0.1", port=9160)
Cassandra by default listens to port 9160 but you can change it
according to your configuration. To show the cluster type into your
prompt RC.cluster.name(connect.handle)
Just to verify that you are connected and your Cassandra instance is running try the following command:
RC.describe.keyspaces(connect.handle)
That should bring back a list of the settings in your keyspaces. If nothing returns, you are either not connected or your Cassandra instance is not properly installed.
EXAMPLE OUTPUT
$system_traces$strategy_options
replication_factor
"2"
$system_traces$cf_defs
named list()
$system_traces$durable_writes
[1] TRUE
Let me know what your results are if my answer does not work and I will update my answer. Good Luck!
make use of RODBC instead of using RCassandra. We need to install Cassandra ODBC driver.
Thanks #D. Venkata Naresh, your suggestion of using RODBC driver resolved my issue.
I am using R and datastax cassandra community edition.
This is the link I followed to configure the ODBC driver in my windows machine.
https://www.datastax.com/dev/blog/using-the-datastax-odbc-driver-for-apache-cassandra
Then, in my R studio, These are the commands to connect and fetch from the Cassandra
install.packages("RODBC")
library("RODBC")
require("RODBC")
conn <- odbcConnect(<ODBC datasource name>)
dataframe <- sqlFetch(conn, <column family / table name>)
dataframe
Hope, this answer helps someone who is facing issue with RCassandra.
I read your comments above, you are using the wrong port. You should run the following command
c <- RC.connect('192.168.1.20', 9160)
This will definitely work for you.

How to use ODBC to connect to any DBMS

I'm developping a java application and i'm using JDBC to connect to MySQL Database, now i want to use ODBC to be able to get and retrieve data from any DBMS, of course if have access to it. Is there an API or tool to do this ?
What you are looking for is a JDBC-ODBC bridge. There are several available. It is not recommended, instead you should always use a native JDBC driver.

OBIEE connect to impala

I'm trying to connect OBIEE to Impala. Where I try my test, I encounter a problem that I can't
resolved,here comes my steps:
download the Cloudera latest Impala ODBC driver for windows,and import metadata from impala,I can finally successfully see data in Admin Tools like this:
upload the rpd file to the server,and download cloudera impala odbc driver for linux,and configure it,in the end ,I can do it like this which shows I have configure the driver successfully:
I try to create new analysis through 【Create Direct Database Request】 to test weather I can successfully connect Impala, but I can never connect it due to the reason like this,I can never fingure out why:
Is there anybody successfully do it or tell me how I can resolve the problem? Thanks!
I recommend connecting directly to Hive instead. According to Oracle's documentation Impala connectivity is not directly supported. OBIEE is built connect to Hive and Impala is not referenced:
http://docs.oracle.com/cd/E28280_01/bi.1111/e10540/deploy_rpd.htm#BABGIAJH

OLE DB Database Connectivity with R

I am trying to connect to an iHistorian Database. This database is a product of GE and it records process control information. Anyway, this database is configured with OLE DB drivers. I am curious if there is a way to connect to this database with R. Currently, R has a package called RODBC, but this package only connects to ODBC. Any suggestions would be helpful.
Thanks

Resources