General questions about Yandex MetaData Hub
Written by
Updated at October 13, 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 <DB_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 Processing cluster. To create a database, use the following syntax:
CREATE DATABASE IF NOT EXISTS <DB_name> LOCATION <DB_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>/<DB_name>
. Specifying a folder is optional; however, objects will load into a folder faster than into the bucket root.