-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmyrule.json
91 lines (91 loc) · 2.11 KB
/
myrule.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
{
"transform_datatype_rules":
[
{
"translate_from": "GEOMETRY",
"translate_from_autoinc": false,
"translate_to": "TEXT",
"translate_to_size": -1
},
{
"translate_from": "POINT",
"translate_from_autoinc": false,
"translate_to": "TEXT",
"translate_to_size": -1
},
{
"translate_from": "inventory.geom.g.GEOMETRY",
"translate_from_autoinc": false,
"translate_to": "GEOMETRY",
"translate_to_size": 0
},
{
"translate_from": "inventory.orders.quantity.INT",
"translate_from_autoinc": false,
"translate_to": "BIGINT",
"translate_to_size": 0
}
],
"transform_objectname_rules":
[
{
"object_type": "table",
"source_object": "inventory.orders",
"destination_object": "schema1.orders"
},
{
"object_type": "table",
"source_object": "inventory.products",
"destination_object": "products"
},
{
"object_type": "table",
"source_object": "testDB.dbo.customers",
"destination_object": "schema1.people"
},
{
"object_type": "table",
"source_object": "inventory.altertest",
"destination_object": "schema2.notaltertest"
},
{
"object_type": "column",
"source_object": "inventory.orders.order_number",
"destination_object": "ididid"
},
{
"object_type": "column",
"source_object": "inventory.orders.purchaser",
"destination_object": "the_dude"
},
{
"object_type": "column",
"source_object": "inventory.orders.quantity",
"destination_object": "the_numba"
},
{
"object_type": "column",
"source_object": "testDB.dbo.customers.first_name",
"destination_object": "the_awesome_first_name"
}
],
"transform_expression_rules":
[
{
"transform_from": "inventory.orders.quantity",
"transform_expression": "case when %d < 500 then 0 else %d end"
},
{
"transform_from": "inventory.geom.g",
"transform_expression": "ST_SetSRID(ST_GeomFromWKB(decode('%w', 'base64')),%s)"
},
{
"transform_from": "inventory.products.name",
"transform_expression": "'>>>>>' || '%d' || '<<<<<'"
},
{
"transform_from": "inventory.products.description",
"transform_expression": "'>>>>>' || '%d' || '<<<<<'"
}
]
}