Failed to create query error when upgrading external metastore to Unity Catalog

The "Create query for upgrade" command only works when run on a warehouse in Data Explorer.

Written by Atanu.Sarkar

Last published at: March 15th, 2023


You are trying to migrate your default Hive metastore to Unity Catalog by following the steps in the Upgrade a schema or multiple tables to Unity Catalog (AWS | Azure) documentation.

You have created the necessary storage credential (AWS | Azure) as well as the external location (AWS | Azure). Permissions are correct. You click Create Query for Upgrade and try to run the generated query, but it generates a Failed to create query error.

Failed to create query try again {"message": "Internal Server Error"}


Create query for upgrade only works when running the command on a warehouse. If you select a cluster instead of a warehouse in Data Explorer, the upgrade query fails to run.


Ensure you select a warehouse from the drop down menu in the upper right corner of the Data Explorer page before you try to run an upgrade query.

Cluster and warehouse drop down menu in Data Explorer.

Was this article helpful?