Define metadata rules
When you've connected your metastores, define the metadata rules that determine the metadata you want to migrate.
Ensure that you have migrated the data for the databases and tables that you want to migrate.
You need both the data and associated metadata before you can successfully run queries on migrated databases.
Hivemigrator automatically applies default exclusions for any metadata rule. See Default metadata exclusions to learn more.
Define metadata rules with the UI
In the UI, metadata rules are defined when creating a metadata migration.
Define metadata rules with the CLI
Add metadata rules
Define which databases and tables you want to migrate by creating metadata rules.
Create a database pattern and a table pattern.
Wildcards support
When creating patterns for your migration, note the following:
If using Hive 1, 2, or 3: Only use patterns with the wildcards
*
and|
.For example, using
--database-pattern test*
will match any database with "test" at the beginning of its name, such astest01
,test02
,test03
.If using Hive 4: Use any wildcards based on Hive's Data Definition Language (DDL).
Command | Action |
---|---|
hive rule add , hive rule create | Create a metadata rule that can be used for a migration |
Configure existing metadata rules
Command | Action |
---|---|
hive rule configure | Configure an existing metadata rule |
Manage metadata rules
Command | Action |
---|---|
hive rule delete | Delete a metadata rule |
hive rule list | List all metadata rules |
hive rule show | Show the configuration of a metadata rule |
Next steps
Once you have defined the metadata rules, create a metadata migration.