COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Cognos Administration => Topic started by: satish217_1990 on 04 Feb 2015 04:01:38 AM

Title: Connect Hive with Cognos 10.2
Post by: satish217_1990 on 04 Feb 2015 04:01:38 AM
Hey all.. I have few tables in Hive. Want to use those tables in Cognos Report Studio. Can someone guide me how to connect the Hive DB with Cognos 10.2? I don't see anything related to Hive in New Data Source Creation wizard. Please help.
Title: Re: Connect Hive with Cognos 10.2
Post by: MFGF on 04 Feb 2015 08:34:57 AM
Quote from: satishfy on 04 Feb 2015 04:01:38 AM
Hey all.. I have few tables in Hive. Want to use those tables in Cognos Report Studio. Can someone guide me how to connect the Hive DB with Cognos 10.2? I don't see anything related to Hive in New Data Source Creation wizard. Please help.

Hi,

Not sure if you have this option back in 10.2, but in case, here goes:

1. Create a new data source. Give it a name and press Next
2. Choose "JDBC" from the Type dropdown and press Next
(https://image.ibb.co/hVXV7k/jdbc_zpsdc1145e4.png)
3. Choose "Hive" from the JDBC Type dropdown, then fill in the connection details
(https://image.ibb.co/ntHrDQ/hive_zps600385eb.png)

I can't remember when this option was added, but hopefully it's there in your 10.2 build.

Cheers!

MF.
Title: Re: Connect Hive with Cognos 10.2
Post by: Cognos8 on 04 Feb 2015 11:22:53 PM
Hi,

ODBC hive connection works fine  but JDBC Hive is not working. i have raised PMR on this will keep you posted. if you found any solution let me know.
Title: Re: Connect Hive with Cognos 10.2
Post by: MFGF on 05 Feb 2015 03:39:48 AM
Quote from: Cognos8 on 04 Feb 2015 11:22:53 PM
Hi,

ODBC hive connection works fine  but JDBC Hive is not working. i have raised PMR on this will keep you posted. if you found any solution let me know.

Have you copied the Hive JDBC jar files into your Cognos instance?

MF.
Title: Re: Connect Hive with Cognos 10.2
Post by: satish217_1990 on 09 Feb 2015 12:54:23 AM
MFGF.. Thanks for your reply. I will try this and let you know.
Title: Re: Connect Hive with Cognos 10.2
Post by: satish217_1990 on 09 Feb 2015 09:13:03 AM
I have pasted the .JAR files in the respective path and chose "Hive" from the JDBC Type dropdown in Data Source Creation Wizard.. But when I test the connection, I get the below error.. Please help..

XQE-JDB-0004 A problem occurred finding the driver class "org.apache.hadoop.hive.jdbc.HiveDriver".
Title: Re: Connect Hive with Cognos 10.2
Post by: MFGF on 09 Feb 2015 12:06:29 PM
Quote from: satishfy on 09 Feb 2015 09:13:03 AM
I have pasted the .JAR files in the respective path and chose "Hive" from the JDBC Type dropdown in Data Source Creation Wizard.. But when I test the connection, I get the below error.. Please help..

XQE-JDB-0004 A problem occurred finding the driver class "org.apache.hadoop.hive.jdbc.HiveDriver".

Did you restart your Cognos service after copying in the files? Where in the instance did you copy them to?

MF.
Title: Re: Connect Hive with Cognos 10.2
Post by: Cognos8 on 09 Feb 2015 10:26:25 PM
Hi,

I faced the same error after placing Hive and impala .jar files. IBM confirmed i have placed right .jar files. Still the PMR is pending with IBM.

Title: Re: Connect Hive with Cognos 10.2
Post by: satish217_1990 on 10 Feb 2015 07:02:14 AM
Quote from: MFGF on 09 Feb 2015 12:06:29 PM
Did you restart your Cognos service after copying in the files? Where in the instance did you copy them to?

MF.

I copied the below .jar files to <c10 install folder>\webapps\p2pd\web-inf\lib. My Hadoop version is 1.2.1 and Hive version is 0.14.0


I have restarted the Cognos service and now I'm getting the below (different) error. Please help.

XQE-DS-0006 Unable to logon to the data source.
Could not establish connection to <ip-address>:10000/default:java.net.ConnectException: Connection timed out: connect
Title: Re: Connect Hive with Cognos 10.2
Post by: Cognos8 on 13 Feb 2015 04:08:09 AM
Hi,

Yes i faced this issue as well, eventhough uid and pwd are correct. Place your .jar files in c10 v5dataserver as well and restart cognos service
Title: Re: Connect Hive with Cognos 10.2
Post by: pk.mahadevan on 18 Feb 2015 08:40:44 AM
RE: Satish

Any update on connecting successfully using the JDBC connectivity? Thank you

Regards,
PK
Title: Re: Connect Hive with Cognos 10.2
Post by: satish217_1990 on 19 Feb 2015 05:34:05 AM
Hi PKM..

No. I'm still stuck up and getting the below error.
Unable to connect to data source
could not establish connection to java.net.connectexception: connection timed out

If anyone have ideas please post here please.
Title: Re: Connect Hive with Cognos 10.2
Post by: pk.mahadevan on 19 Feb 2015 01:23:24 PM
Thanks Satish!

Any link or document that you guys followed for the JDBC Driver installation in the Cognos BI Servers?

Regards,
PK
Title: Re: Connect Hive with Cognos 10.2
Post by: MFGF on 23 Feb 2015 04:40:41 AM
Quote from: PKM on 19 Feb 2015 01:23:24 PM
Thanks Satish!

Any link or document that you guys followed for the JDBC Driver installation in the Cognos BI Servers?

Regards,
PK

Hi,

Take a look at the Dynamic Query Cookbook:

http://www.ibm.com/developerworks/data/library/cognos/infrastructure/cognos_specific/page529-pdf.pdf

There is a chapter on configuring data source connectivity.

Cheers!

MF.
Title: Re: Connect Hive with Cognos 10.2
Post by: satish217_1990 on 24 Feb 2015 12:05:03 AM
I have installed Cognos 10.2.1 FP3 since it supports till Hive 0.12.0

But now I get the below error.
XQE-JDB-0012 Could not load the driver "class org.apache.hadoop.hive.jdbc.HiveDriver" because it is not certified for use with this product.
Title: Re: Connect Hive with Cognos 10.2
Post by: MFGF on 24 Feb 2015 04:47:54 AM
Quote from: satishfy on 24 Feb 2015 12:05:03 AM
I have installed Cognos 10.2.1 FP3 since it supports till Hive 0.12.0

But now I get the below error.
XQE-JDB-0012 Could not load the driver "class org.apache.hadoop.hive.jdbc.HiveDriver" because it is not certified for use with this product.

Did you manually enter that string (org.apache.hadoop.hive.jdbc.HiveDriver) as the class name? It doesn't look correct to me - it should be org.apache.hive.jdbc.HiveDriver

MF.
Title: Re: Connect Hive with Cognos 10.2
Post by: the6campbells on 11 Apr 2015 02:33:09 PM
Each release of Apache Hive will require that you have the equivalent Hive JDBC driver.

The set of JAR files that Apache distributes will vary across those releases.

Hence, you need to look at the Apache Hive WIKI site or the equivalent online documentation that Hortonworks, Cloudera, Mapr, Amazon or whomever supplies for the distro of Hive you are planning to use.

Do not assume that you can mix different versions of Apache drivers with servers.

Ensure you copied the set of JAR files under <c10x>\webapps\p2pd\WEB-INF\lib

Connections as of Hive 0.10 would normally point to HiveServer2 versus HiveServer - for more details reference the Apache documentation.

https://cwiki.apache.org/confluence/display/Hive/Home#Home-HiveDocumentation