mkabilov / pg2ch

Data streaming from postgresql to clickhouse via logical replication mechanism
MIT License
195 stars 35 forks source link

partitioned tables in config #23

Open mkabilov opened 5 years ago

mkabilov commented 5 years ago

in case of setting up replication for child tables of the partitioned table it will be useful to specify pattern for tables, i.e. instead of :

    partitions.report_2017_03_01:
        main_table: report
        engine: CollapsingMergeTree
        init_sync_skip_truncate: true
    partitions.report_2017_04_01:
        main_table: report
        engine: CollapsingMergeTree
        init_sync_skip_truncate: true
    partitions.report_2017_05_01:
        main_table: report
        engine: CollapsingMergeTree
        init_sync_skip_truncate: true
    partitions.report_2017_01_01:
        main_table: report
        engine: CollapsingMergeTree
        init_sync_skip_truncate: true

write something like that:

    partitions.report_*:
        main_table: report
        engine: CollapsingMergeTree
        init_sync_skip_truncate: true

TBD