General questions about Yandex MetaData Hub
Written by
Updated at September 16, 2024
How do I fix the error I get when creating a database in Hive Metastore?
The error occurs if you use the following syntax to create a database:
CREATE DATABASE IF NOT EXISTS <database_name>;
Metastore does not allow creating a database or table in Hive: they are stored in a Yandex Object Storage bucket linked to a Yandex Data Proc cluster. To create a database, use the following syntax:
CREATE DATABASE IF NOT EXISTS <database_name> LOCATION <database_location>;
In the LOCATION
parameter, specify the path to the bucket and the database in it in the following format: s3a://<bucket_name>/<folder_name>/<database_name>
. Specifying a folder is optional; however, objects will load into a folder faster than into the bucket root.