Define metadata rules
Once you have connected your metastores, define the metadata rules that determine the metadata you want to migrate.
important
Ensure that you have migrated the HCFS data for the databases and tables that you want to migrate.
Both HCFS data and associated metadata are needed before successful queries can be run on migrated databases.
#
Define metadata rules with the UIIn the UI, metadata rules are defined when creating a metadata migration.
#
Define metadata rules with the CLI#
Add hive rulesDefine which databases and tables you want to migrate by creating hive rules.
Create a database pattern and a table pattern based upon Hive DDL that will match the databases and tables you want to migrate. For example, using --database-pattern test*
will match any database with "test" at the beginning of its name, such as test01
, test02
, test03
.
Command | Action |
---|---|
hive rule add ,hive rule create | Create a hive rule that can be used for a migration |
#
Configure existing hive rulesCommand | Action |
---|---|
hive rule configure | Configure an existing hive rule |
#
Manage hive rulesCommand | Action |
---|---|
hive rule delete | Delete a hive rule |
hive rule list | List all hive rules |
hive rule show | Show the configuration of a hive rule |
#
Next stepsOnce you have defined the metadata rules, create a metadata migration.