@Ashish Singh :
The error "java.util.NoSuchElementException" typically means that the element you are trying to access is not found. In this case, it seems like the configuration option "hive.metastore.uris" is not set or not present in your Hive configuration.
If you are using Glue as the metastore for Databricks, you can get the URI for the metastore by following these steps:
- Go to the AWS Glue Console
- Click on the Glue Catalog that you are using with Databricks
- Click on "Databases" in the left sidebar
- Click on the name of the database that contains the Delta tables you want to query
- Click on "Tables" in the left sidebar
- Click on the name of the Delta table you want to query
- In the table details page, you should see the "Storage Descriptor" section
- In the "Location" field, you will see the S3 path to the Delta table
- Replace the S3 protocol with "glue" and remove the trailing "/" from the S3 path to get the Glue Data Catalog URI.
For example, if your S3 path is "s3://my-bucket/my-table/", the Glue Data Catalog URI would be "glue://my-bucket/my-table".
Regarding Unity Catalog, you can find the JDBC URL for Unity Catalog by following these steps:
- Go to the Databricks workspace
- Click on the "Clusters" tab in the left sidebar
- Click on the name of the cluster that you want to use with Presto
- In the "JDBC/ODBC" tab, you will see the JDBC URL for the cluster
- Replace the "/default" part of the URL with the name of the Unity Catalog database that contains the Delta table you want to query.
For example, if your JDBC URL is "jdbc:databricks://<databricks-instance>/default;transportMode=http;httpPath=sql/protocolv1/o/0/<databricks-cluster-id>", and your Unity Catalog database is called "my_db", the modified JDBC URL would be "jdbc:databricks://<databricks-instance>/my_db;transportMode=http;httpPath=sql/protocolv1/o/0/<databricks-cluster-id>".