Ashish Thapliyal shows how to create a custom Hive metastore in HDInsight:
Custom Metastore – HDInsight lets you pick custom Metastore. It’s a recommended approach for production clusters due to number reasons such as
You bring your own Azure SQL database as Metastore
As lifecycle of Metastore is not tied to a cluster lifecycle, you can create and delete clusters without worrying about the metadata loss.
Custom Metastore lets you attach multiple clusters and cluster types to same Metastore. Example – Single Metastore can be shared across Interactive Hive, Hive and Spark clusters in HDInsight
You pay for the cost of Metastore (Azure SQL DB)
Read on to see how to do this.