Exporting and importing Hive metadata in the Metastore cluster
Getting started
-
Create a service account named
my-account
with thestorage.uploader
andmanaged-metastore.integrationProvider
roles. -
Configure the network and create a Metastore cluster. When creating it, specify the
my-account
service account.Warning
Data export and import are only available in Metastore clusters with a static access key.
-
Create a bucket named
my-bucket
in Yandex Object Storage. It will store the metadata file for import and export. -
Grant a
READ and WRITE
permission to themy-account
service account for the bucket namedmy-bucket
.
For more information about connecting to the bucket with configured bucket policies, see this guide.
Export data
-
Go to the folder page
and select Yandex MetaData Hub. -
In the left-hand panel, select the
Metastore page. -
Click
for the cluster you need and select Export. -
In the window that opens, specify:
- The bucket named
my-bucket
the cluster data will be exported to. - The
.sql
file the cluster data will be written to. If a file with that name already exists, it will be overwritten.
- The bucket named
-
Click Export.
Import data
Before importing, upload the .sql
file with metadata into my-bucket
. For information on how to prepare a file and how the import process works, see Transferring data between Yandex Data Processing clusters using Metastore.
To import data to a cluster:
- Go to the folder page
and select Yandex MetaData Hub. - In the left-hand panel, select the
Metastore. - Click
for the cluster you need and select Import. - In the window that opens, select the bucket named
my-bucket
and the file the cluster data will be imported from. - Click Import.