Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.
This repository was archived by the owner on May 17, 2024. It is now read-only.

Support different where filter for source table and target table #889

@Schumpeterx

Description

@Schumpeterx

describe.
For different database the where filer may different. Blow is an exmple:

In postgresql we use date_trunc('month', cast(current_date as timestamptz)- interval '0 month') to get the first day of month .
While in mysql the sql should be cast(date_add(curdate(),interval -day(curdate())+1 day)as datetime).

Describe the solution you'd like
Adding source_where and target_where to the configuration file may be a good choice

[run.test]
  # Source 1 ("left")
  1.database = "mysql"
  1.table = "test_time"

  # Source 2 ("right")
  2.database = "pdb"
  2.table = "test_time"
.................
  key_columns = ["id"]
  columns = ["time_col"]
  source_where="time_col!='2024-01-01 00:00:00'"
  target_where="time_col!='2024-01-02 00:00:00'"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions