Skip to content

[Feature] kafka_sync_database supports table name mapping when prefix and postfix could not fit the need.  #4659

@JackeyLee007

Description

@JackeyLee007

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

We are in the middle of transfer from existing warehouse to paimon. There are some irregular tables, whose names are not only prefixed or postfixed with the source tables. Even though we could adapt the sql to prefix and postfix, but it will cost too much time. So, we need the table name mapping. And the mapping rule has a higher priority than prefix and postfix.

Solution

Add a new configuration option, named as table_mapping. And user could supply more than one map rule, like the following:

kafka_sync_database
...
--table_mapping src1=tgt1
--table_mapping src2=tgt2
...
--table_mapping srcn=tgtn
...

If there is one table named as src1, src2, ..., srcn, the sinked table name should be tgt1, tgt2, ... tgtn, even though prefix or postfix are configured too.

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions