-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpgsync.json
111 lines (111 loc) · 2.48 KB
/
pgsync.json
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
[
{
"database": "postgres",
"index": "users_index",
"nodes": {
"table": "users",
"primary_key": ["id"],
"columns": [
"id",
"username",
"unsigned_name",
"full_name",
"alter_name",
"email",
"personal_email",
"phone",
"work_phone",
"date_of_birth",
"code",
"temporary_address",
"permanent_address",
"group_id",
"root_group_id",
"status"
],
"children": [
{
"table": "groups",
"columns": [
"id",
"group_code",
"group_name",
"group_path",
"path_name",
"group_type",
"group_level",
"order_no",
"status"
],
"label": "group",
"relationship": {
"variant": "object",
"type": "one_to_one",
"foreign_key": {
"child": ["id"],
"parent": ["group_id"]
}
},
"transform": {
"rename": {
"path_name": "group_path_name"
}
}
},
{
"table": "cm_position",
"label": "positions",
"columns": ["id", "code", "name", "order_num", "status"],
"relationship": {
"variant": "object",
"type": "one_to_many",
"through_tables": ["user_position"]
}
},
{
"table": "user_position",
"label": "positionRefs",
"columns": ["position_id", "position_type"],
"relationship": {
"variant": "object",
"type": "one_to_many",
"foreign_key": {
"child": ["user_id"],
"parent": ["id"]
}
}
}
],
"transform": {
"mapping": {
"phone": {
"type": "keyword"
},
"email": {
"type": "keyword"
},
"username": {
"type": "keyword"
},
"unsigned_name": {
"type": "keyword"
},
"group": {
"type": "nested",
"properties": {
"group_path": {
"type": "keyword"
}
}
},
"positions": {
"type": "nested"
},
"positionRefs": {
"type": "nested"
}
}
}
}
}
]