Skip to main content
Version: 1.22.0

Define metadata rules

When you've connected your metastores, define the metadata rules that determine the metadata you want to migrate.

info

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.

note

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.

note

Wildcards support
When creating patterns for your migration, note the following:

  • If using Hive 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 as test01, test02, test03.

  • If using Hive 4: Use any wildcards based on Hive's Data Definition Language (DDL).

CommandAction
hive rule add, hive rule createCreate a metadata rule that can be used for a migration

Configure existing metadata rules

CommandAction
hive rule configureConfigure an existing metadata rule

Manage metadata rules

CommandAction
hive rule deleteDelete a metadata rule
hive rule listList all metadata rules
hive rule showShow the configuration of a metadata rule

Next steps

Once you have defined the metadata rules, create a metadata migration.