pingcap / pingcap/tiflow

DM: support PCRE regexp syntax for routing

Open
#11,635 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/dm type/feature
Dominant language
Go
Stars
464
Forks
313
Avg merge
4d 7h
Merged PRs (30d)
14

Description

Is your feature request related to a problem?

I'd like to consolidate many schema by a simple route config.

Describe the feature you'd like

if there are databases for source like

  • mercari_a
  • mercari_b
  • mercari_c
  • mercari_d
  • mercari_e

following config do not work

  route-a:
    schema-pattern: "mercari_a"
    target-schema: "mercari"
  route-others:
    schema-pattern: "mercari_(?!a).*"
    target-schema: "mercari-other"
Describe alternatives you've considered

No response

Teachability, Documentation, Adoption, Migration Strategy

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the DM route configuration handling for schema-pattern and its existing regular-expression tests. Verify how the shown negative-lookahead pattern is parsed and matched; done means PCRE syntax such as mercari_(?!a).* routes the remaining schemas to mercari-other without breaking existing patterns.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
data-engineering, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.