-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathriver.toml
More file actions
84 lines (68 loc) · 1.57 KB
/
Copy pathriver.toml
File metadata and controls
84 lines (68 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# MySQL address, user and password.
# The user must have replication privilege in MySQL.
my_addr = "127.0.0.1:3306"
my_user = "root"
my_pass = ""
my_charset = "utf8"
# Default PostgreSQL target.
pg_host = "127.0.0.1"
pg_port = 5432
pg_user = "postgres"
pg_pass = ""
pg_dbname = "test"
pg_maxconn = 16
# Path to store data such as master.info.
data_dir = "./var"
# Internal HTTP status address.
stat_addr = "127.0.0.1:12800"
# Pseudo server id used by the MySQL replication client.
server_id = 1001
# mysql or mariadb
flavor = "mysql"
# mysqldump execution path. If empty, initial dump is skipped.
mysqldump = "mysqldump"
# skip_master_data = false
# Ignore tables without primary key.
skip_no_pk_table = false
# MySQL data source.
[[source]]
schema = "test"
tables = ["orders", "orders_[0-9]{4}", "order_fields", "order_filter"]
# Simple table mapping.
[[rule]]
schema = "test"
table = "orders"
pg_schema = "public"
pg_table = "orders"
# Wildcard table mapping. The wildcard table must also appear in [[source]].
[[rule]]
schema = "test"
table = "orders_[0-9]{4}"
pg_schema = "public"
pg_table = "orders"
# Field mapping.
[[rule]]
schema = "test"
table = "order_fields"
pg_schema = "public"
pg_table = "order_fields"
[rule.field]
id = "pg_id"
tags = "pg_tags,list"
created_at = ",date"
# Filter rule.
[[rule]]
schema = "test"
table = "order_filter"
pg_schema = "public"
pg_table = "order_filter"
filter = ["id", "name"]
# Optional named PostgreSQL target.
[[target]]
pg_name = "archive"
pg_host = "127.0.0.1"
pg_port = 5432
pg_user = "postgres"
pg_pass = ""
pg_dbname = "archive"
pg_maxconn = 16