<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic SQL Endpoint with External Hive Metastore in Data Governance</title>
    <link>https://community.databricks.com/t5/data-governance/sql-endpoint-with-external-hive-metastore/m-p/22102#M745</link>
    <description>&lt;P&gt;I am trying to setup a Databricks SQL endpoint to connect to an external hive metastore. I have replicated my metastore spark config in the SQL endpoint, with the addition of adding&amp;nbsp;the below to the configuration:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;spark.sql.hive.metastore.jars maven&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I keep getting the&amp;nbsp;error&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are currently using Azure Databricks, Hive Metastore version 0.13, and an Azure MySQL database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the full SQL endpoint configuration:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;spark.hadoop.javax.jdo.option.ConnectionPassword {{secrets/keyvault/db-secret-name}}
spark.hadoop.javax.jdo.option.ConnectionURL jdbc:mysql://my-dbserver-name.mysql.database.azure.com:3306/my-db-name?sslMode=PREFERRED&amp;amp;verifyServerCertificate=true
spark.hadoop.javax.jdo.option.ConnectionDriverName com.mysql.jdbc.Driver
spark.sql.hive.metastore.version 0.13
spark.hadoop.javax.jdo.option.ConnectionUserName adminuser@my-db-name
spark.sql.hive.metastore.jars maven
spark.hadoop.hive.metastore.schema.verification false
spark.hadoop.hive.metastore.schema.verification.record.version false
spark.sql.hive.metastore.schema.verification.record.version true
spark.hadoop.datanucleus.autoCreateSchema false
spark.sql.hive.metastore.schema.verification true
spark.hadoop.datanucleus.schema.autoCreateTables false
spark.hadoop.datanucleus.fixedDatastore true&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Do SQL endpoints support Hive Metastore version 0.13? Or any other guidance here would be appreciated.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Apr 2022 20:55:49 GMT</pubDate>
    <dc:creator>Seth_J</dc:creator>
    <dc:date>2022-04-26T20:55:49Z</dc:date>
    <item>
      <title>SQL Endpoint with External Hive Metastore</title>
      <link>https://community.databricks.com/t5/data-governance/sql-endpoint-with-external-hive-metastore/m-p/22102#M745</link>
      <description>&lt;P&gt;I am trying to setup a Databricks SQL endpoint to connect to an external hive metastore. I have replicated my metastore spark config in the SQL endpoint, with the addition of adding&amp;nbsp;the below to the configuration:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;spark.sql.hive.metastore.jars maven&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I keep getting the&amp;nbsp;error&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are currently using Azure Databricks, Hive Metastore version 0.13, and an Azure MySQL database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the full SQL endpoint configuration:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;spark.hadoop.javax.jdo.option.ConnectionPassword {{secrets/keyvault/db-secret-name}}
spark.hadoop.javax.jdo.option.ConnectionURL jdbc:mysql://my-dbserver-name.mysql.database.azure.com:3306/my-db-name?sslMode=PREFERRED&amp;amp;verifyServerCertificate=true
spark.hadoop.javax.jdo.option.ConnectionDriverName com.mysql.jdbc.Driver
spark.sql.hive.metastore.version 0.13
spark.hadoop.javax.jdo.option.ConnectionUserName adminuser@my-db-name
spark.sql.hive.metastore.jars maven
spark.hadoop.hive.metastore.schema.verification false
spark.hadoop.hive.metastore.schema.verification.record.version false
spark.sql.hive.metastore.schema.verification.record.version true
spark.hadoop.datanucleus.autoCreateSchema false
spark.sql.hive.metastore.schema.verification true
spark.hadoop.datanucleus.schema.autoCreateTables false
spark.hadoop.datanucleus.fixedDatastore true&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Do SQL endpoints support Hive Metastore version 0.13? Or any other guidance here would be appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 20:55:49 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/sql-endpoint-with-external-hive-metastore/m-p/22102#M745</guid>
      <dc:creator>Seth_J</dc:creator>
      <dc:date>2022-04-26T20:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Endpoint with External Hive Metastore</title>
      <link>https://community.databricks.com/t5/data-governance/sql-endpoint-with-external-hive-metastore/m-p/22103#M746</link>
      <description>&lt;P&gt;&lt;A href="https://docs.databricks.com/data/metastores/external-hive-metastore.html" target="test_blank"&gt;https://docs.databricks.com/data/metastores/external-hive-metastore.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In particular:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Spark specific configuration options&lt;/P&gt;&lt;P&gt;spark.sql.hive.metastore.version &amp;lt;hive-version&amp;gt;&lt;/P&gt;&lt;P&gt;# Skip this one if &amp;lt;hive-version&amp;gt; is 0.13.x.&lt;/P&gt;&lt;P&gt;spark.sql.hive.metastore.jars &amp;lt;hive-jar-source&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 04:11:44 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/sql-endpoint-with-external-hive-metastore/m-p/22103#M746</guid>
      <dc:creator>User16741082858</dc:creator>
      <dc:date>2022-04-27T04:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Endpoint with External Hive Metastore</title>
      <link>https://community.databricks.com/t5/data-governance/sql-endpoint-with-external-hive-metastore/m-p/22104#M747</link>
      <description>&lt;P&gt;Thanks for your reply. I tried without spark.sql.hive.metastore.jars first, but I saw in another thread here to include spark.sql.hive.metastore.jars albeit for another version of the metastore. Without spark.sql.hive.metastore.jars being specified I get the same error.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 14:02:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/sql-endpoint-with-external-hive-metastore/m-p/22104#M747</guid>
      <dc:creator>Seth_J</dc:creator>
      <dc:date>2022-04-27T14:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Endpoint with External Hive Metastore</title>
      <link>https://community.databricks.com/t5/data-governance/sql-endpoint-with-external-hive-metastore/m-p/22106#M749</link>
      <description>&lt;P&gt;Yes, unfortunately I haven't been able to figure it out yet. I have also reached out to some Azure reps to see if anyone there might be able to help.&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 23:03:38 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/sql-endpoint-with-external-hive-metastore/m-p/22106#M749</guid>
      <dc:creator>Seth_J</dc:creator>
      <dc:date>2022-05-16T23:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Endpoint with External Hive Metastore</title>
      <link>https://community.databricks.com/t5/data-governance/sql-endpoint-with-external-hive-metastore/m-p/22107#M750</link>
      <description>&lt;P&gt;Hi @SETH JENSEN​&amp;nbsp;, Just checking if you were able to solve this issue? If no, Can you try to modify the connection string and make sslMode=Require and see if it works?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 13:30:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/sql-endpoint-with-external-hive-metastore/m-p/22107#M750</guid>
      <dc:creator>Vivian_Wilfred</dc:creator>
      <dc:date>2022-06-24T13:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Endpoint with External Hive Metastore</title>
      <link>https://community.databricks.com/t5/data-governance/sql-endpoint-with-external-hive-metastore/m-p/22108#M751</link>
      <description>&lt;P&gt;Thanks for the suggestion. I tried sslMode=Require, sslMode=REQUIRED, and sslMode=VERIFY_CA from the MySQL driver docs, but I am still receiving the same error.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 22:10:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/sql-endpoint-with-external-hive-metastore/m-p/22108#M751</guid>
      <dc:creator>Seth_J</dc:creator>
      <dc:date>2022-07-06T22:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Endpoint with External Hive Metastore</title>
      <link>https://community.databricks.com/t5/data-governance/sql-endpoint-with-external-hive-metastore/m-p/22110#M753</link>
      <description>&lt;P&gt;Thanks, this was a great suggestion to try to figure out what's happening behind the scenes. Unfortunately, I am at a bit of a loss on what to do next. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting the error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Caused by: org.datanucleus.store.rdbms.connectionpool.DatastoreDriverNotFoundException: The specified datastore driver ("com.mysql.jdbc.Driver") was not found in the CLASSPATH. Please check your CLASSPATH specification, and the name of the driver.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I also tried using "com.mysql.cj.jdbc.Driver" as the driver name, since that is what is in the MySQL connector documentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried downloading the correct driver from the documentation by setting &lt;B&gt;&lt;I&gt;spark.sql.hive.metastore.jars&lt;/I&gt;&lt;/B&gt; to &lt;B&gt;&lt;I&gt;maven&lt;/I&gt;&lt;/B&gt;, however the command below from the documentation is giving me Permission denied errors:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;%sh cp -r &amp;lt;path&amp;gt; /dbfs/hive_metastore_jar&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;lt;path&amp;gt; for me here was /local_disk0/tmp/hive-v13-4467a09c-d7cd-42cf-824f-47ca74cc7bc4 from the logs. I tried copying all of /local_disk0/tmp, but this directory was omitted from the copy. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then tried just downloading the mysql connector JAR (mysql-connector-java-8.0.30.jar) from maven manually, uploaded it to dbfs, and created a global init script to copy the JAR to the local filesystem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;sleep 10
cp /dbfs/hive_metastore_jars/*.jar /databricks/hive_metastore_jars/&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This global init script wasn't effective, it causes the cluster to not start saying it exited with non-zero exit code. I could be doing something very wrong here, haven't had to do this copy process in the past.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried setting &lt;B&gt;&lt;I&gt;spark.sql.hive.metastore.jars &lt;/I&gt;&lt;/B&gt;to the dbfs path &lt;B&gt;&lt;I&gt;/dbfs/hive_metastore_jars/*&lt;/I&gt;&lt;/B&gt; as I have successfully used this configuration in the past. This didn't work, still getting the "driver not found in classpath" error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anything I am missing here or any ideas on how I can resolve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Seth&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 20:21:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/sql-endpoint-with-external-hive-metastore/m-p/22110#M753</guid>
      <dc:creator>Seth_J</dc:creator>
      <dc:date>2022-07-27T20:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Endpoint with External Hive Metastore</title>
      <link>https://community.databricks.com/t5/data-governance/sql-endpoint-with-external-hive-metastore/m-p/22111#M754</link>
      <description>&lt;P&gt;I realized today what I was doing wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I forgot to add the mysql library in the Libraries tab of the cluster. This resolved the issue for the cluster with Databricks Runtime 10.4. I am able to connect to the metastore without issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to add an external maven library to a SQL Warehouse?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 21:05:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/sql-endpoint-with-external-hive-metastore/m-p/22111#M754</guid>
      <dc:creator>Seth_J</dc:creator>
      <dc:date>2022-07-28T21:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Endpoint with External Hive Metastore</title>
      <link>https://community.databricks.com/t5/data-governance/sql-endpoint-with-external-hive-metastore/m-p/22113#M756</link>
      <description>&lt;P&gt;A Microsoft engineer suggested the same. This did get the SQL Warehouse connected to the metastore. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Odd as this same configuration does not work with a standard Databricks cluster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 16:14:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/sql-endpoint-with-external-hive-metastore/m-p/22113#M756</guid>
      <dc:creator>Seth_J</dc:creator>
      <dc:date>2022-08-17T16:14:25Z</dc:date>
    </item>
  </channel>
</rss>

