0
votes

I am trying to connect my C# application to Hbase (v 0.94) by Simba ODBC Driver (v 1.0.2). I have configured the ODBC DSN successfully for Hbase rest API, but when I am trying to connect Hbase from code it throws exception saying:

ERROR [HY000] [Simba][ODBC] (10430) Not enough information provided to establish
a connection to the data source and specified to not prompt for more information.

But I am giving following attributes in connection-string:

       OdbcConnectionStringBuilder builder = new OdbcConnectionStringBuilder();
       builder.Driver = "Simba Hbase ODBC Driver";
       builder.Dsn = "HbaseTest";
       builder.Add("Host", "192.168.122.5");
       builder.Add("Port", "8080");
       builder.Add("MaxFetchRows", "20000000");
       builder.Add("DefaultMaxColumnSize", "255");
       builder.Add("Sdrl", "128");
       builder.Add("Description", "hbase");
       builder.Add("SslMode", "Preferred");
       builder.Add("User ID", "user");
       builder.Add("Password","pass");
       var con = new OdbcConnection(builder.ConnectionString.ToString());

I have already tried by not providing the credentials, but with no success. Please guide me here, what is missing by me here.

1

1 Answers

0
votes

I'm unsure if this is still a problem for you, however this indicates that one or more required keywords for the HBase driver are not being supplied in the connection string.

If you've already set up your DSN and successfully tested it, then you can replace your code with the following:

   OdbcConnectionStringBuilder builder = new OdbcConnectionStringBuilder();
   builder.Dsn = "HbaseTest";
   var con = new OdbcConnection(builder.ConnectionString.ToString());

If you have a DSN set up already, you can use that directly and use the preconfigured settings. Only use the Driver property if you do not have a DSN already set up. Note that using the Driver property will require you to supply all the required connection settings for the ODBC driver.