6
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
|
-- 每个机器都需要建立各自的replica table,也需要建Distributed table当做路由
create table dm.delphi_membership_properties_replica
(
membership_id int, -- comment '会员id',
membership_uid String, -- comment '会员uid',
business_group_id int, -- comment '商户id',
business_group_uid String , --comment '商户uid',
business_group_name String, -- comment '商户名',
business_id Nullable(int), -- comment '门店id',
business_uid Nullable(String), -- comment '门店uid',
business_name Nullable(String), -- comment '门店name',
membership_source String, -- comment '会员入会来源',
created_at DateTime,
calendar_date Date,
last_visited_date Date, -- comment '最近一次访问时间',
membership_level int, -- comment '会员等级',
customer_type String, -- comment '会员类型:新会员/忠诚会员/常来会员/淡忘会员/流失会员,根据最后一次访问时间和商户配置计算而来',
visit_count int, -- comment '到访次数',
consumptions_count Nullable(int), -- comment '消费次数',
consumptions_original_amount Nullable(Decimal128(2)),
|