0
votes

I have gone through the steps in snowflake documentation to configure a connector between hive and snowflake.

https://docs.snowflake.com/en/user-guide/tables-external-hive.html#step-1-install-the-connector

But i cant see the hive tables or even a connection command in snowflake history.

snow-config.xml:

  <property>
    <name>snowflake.jdbc.username</name>
    <value>user</value>
  </property>
  <property>
    <name>snowflake.jdbc.password</name>
    <value>pwd</value>
  </property>
  <property>
    <name>snowflake.jdbc.role</name>
    <value>ACCOUNTADMIN</value>
  </property>
  <property>
    <name>snowflake.jdbc.account</name>
    <value>ac name</value>
  </property>
  <property>
    <name>snowflake.jdbc.db</name>
    <value>db</value>
  </property>
  <property>
    <name>snowflake.jdbc.schema</name>
    <value>schema</value>
  </property>
  <property>
    <name>snowflake.jdbc.connection</name>
    <value>account</value>
  </property>
</configuration>

I placed the connection jar in hive jar aux path. enter image description here

Added this in hive-site.xml

 <property>
  <name>hive.metastore.event.listeners</name>
  <value>net.snowflake.hivemetastoreconnector.SnowflakeHiveListener</value>
 </property>

restarted hive metastore

hive --service metastore

It's stuck here : Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class is com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

Kindly help me with this.

1
That message sounds like either 1) You got the wrong mysql driver 2) your metastore is misconfiguredOneCricketeer

1 Answers

0
votes

There are changes in connector API:

https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-api-changes.html

The name of the class that implements java.sql.Driver in MySQL Connector/J has changed from com.mysql.jdbc.Driver to com.mysql.cj.jdbc.Driver. The old class name has been deprecated.

In your hive-site.xml update this property:

<property>
    <name>javax.jdo.option.ConnectionDriverName</name>
    <value>com.mysql.jdbc.Driver</value>
    <description>Driver class name for a JDBC metastore</description>
  </property>

Change:

<value>com.mysql.jdbc.Driver</value>

to:

<value>com.mysql.cj.jdbc.Driver</value>