Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dataquality_doc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王东
dataquality_doc
Commits
11a6713f
Commit
11a6713f
authored
Sep 05, 2022
by
王东
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
指标计算承保字段调整
parent
d06c2b43
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
144 additions
and
335 deletions
+144
-335
ODS/ODS_ENDOR.sql
ODS/ODS_ENDOR.sql
+30
-1
ODS/ODS_POLICY.sql
ODS/ODS_POLICY.sql
+28
-0
ZB_CK/同步脚本/ZB_CK_KAFKA_CBDATA.sql
ZB_CK/同步脚本/ZB_CK_KAFKA_CBDATA.sql
+34
-0
ZB_CK/同步脚本/ZB_CK_KAFKA_ENDOR.sql
ZB_CK/同步脚本/ZB_CK_KAFKA_ENDOR.sql
+25
-0
ZB_CK/同步脚本/ZB_CK_KAFKA_POLICY.sql
ZB_CK/同步脚本/ZB_CK_KAFKA_POLICY.sql
+25
-0
ZB_CK/同步脚本/test_dataquery_zb_cbdata.sql
ZB_CK/同步脚本/test_dataquery_zb_cbdata.sql
+0
-56
ZB_CK/同步脚本/test_dataquery_zb_endor_trans.sql
ZB_CK/同步脚本/test_dataquery_zb_endor_trans.sql
+0
-146
ZB_CK/同步脚本/test_dataquery_zb_plicy_trans.sql
ZB_CK/同步脚本/test_dataquery_zb_plicy_trans.sql
+0
-131
ZB_ODS/DDL元数据/CBDATA.sql
ZB_ODS/DDL元数据/CBDATA.sql
+2
-1
No files found.
ODS/ODS_ENDOR.sql
View file @
11a6713f
...
@@ -33,4 +33,33 @@ select
...
@@ -33,4 +33,33 @@ select
sigAndStaExchangeRate
-- 8 到人民币汇率 除了粤港车,车险没有存汇率,模型默认0
sigAndStaExchangeRate
-- 8 到人民币汇率 除了粤港车,车险没有存汇率,模型默认0
from
ODS
.
SOURCE_RMQ_ENDOR_PRD
.
ENDOR
from
ODS
.
SOURCE_RMQ_ENDOR_PRD
.
ENDOR
;
;
\ No newline at end of file
insert
into
ODS
.
ODS_MYSQL
.
MQ_ENDOR
select
endorseNo
as
endorseNo
--0 批单号
,
LongTimeToStringUDF
(
uwConclueDate
,
'yyyyMMdd'
)
as
uwConclueDate
--1 核保通过时间 ??
,
LongTimeToStringUDF
(
plpEndorse
.
endorseEffectiveTime
,
'yyyyMMdd'
)
as
endorseEffectiveTime
--2 起保时间
,
businessOffice
as
businessOffice
--3 保单归属机构代码
,
productCode
as
productCode
--4 险种代码
,
businessChannelCode
as
businessChannelCode
--5 业务渠道
,
businessNatureCode
as
businessNatureCode
--6 业务来源
,
plpEndorse
.
netPremiumVariation
as
netPremiumVariation
--7 9月2日生效 保费变化量
,
sigAndStaExchangeRate
as
sigAndStaExchangeRate
--8
,
plpEndorse
.
staCurPremiumVariation
as
staCurPremiumVariation
--9
,
plcSolution
[
1
].
plcCoins
.
plcCoinsBasicInformation
[
1
].
coinsIdentity
as
coinsIdentity
--0
,
plcSolution
[
1
].
plcCoins
.
plcCoinsBasicInformation
[
1
].
coinsRate
as
coinsRate
--1
,
newPolicyFlag
as
newPolicyFlag
--2
,
autoTransrenewFlag
as
autoTransrenewFlag
--3
,
transferPolicyFlag
as
transferPolicyFlag
--4
,
transrenewFlag
as
transrenewFlag
--5
,
recordClerkCode
as
recordClerkCode
--6
,
policyCreatDate
as
policyCreatDate
from
ODS
.
SOURCE_RMQ_ENDOR_PRD
.
ENDOR
ODS/ODS_POLICY.sql
View file @
11a6713f
...
@@ -34,6 +34,34 @@ select
...
@@ -34,6 +34,34 @@ select
policySort
,
-- 新核心车险保单-保单种类
policySort
,
-- 新核心车险保单-保单种类
businessType
-- 新核心车险保单-业务类型
businessType
-- 新核心车险保单-业务类型
from
ODS
.
SOURCE_RMQ_POLICY_PRD
.
POLICY
from
ODS
.
SOURCE_RMQ_POLICY_PRD
.
POLICY
;
insert
into
ODS
.
ODS_MYSQL
.
MQ_POLICY
select
policyNo
as
policyNo
-- 0
,
LongTimeToStringUDF
(
uwConclueDate
,
'yyyyMMdd'
)
as
uwConclueDate
-- 1
,
LongTimeToStringUDF
(
startTime
,
'yyyyMMdd'
)
as
startTime
-- 2
,
businessOffice
as
businessOffice
-- 3
,
productCode
as
productCode
-- 4
,
businessChannelCode
as
businessChannelCode
-- 5
,
businessNatureCode
as
businessNatureCode
-- 6
,
netPremium
as
netPremium
-- 7
,
sigAndStaExchangeRate
as
sigAndStaExchangeRate
-- 8
,
plcSolution
[
1
].
plcCoins
.
plcCoinsBasicInformation
[
1
].
coinsIdentity
as
coinsIdentity
-- 9
,
plcSolution
[
1
].
plcCoins
.
plcCoinsBasicInformation
[
1
].
coinsRate
as
coinsRate
-- 0
,
newPolicyFlag
as
newPolicyFlag
-- 1
,
autoTransrenewFlag
as
autoTransrenewFlag
-- 2
,
transferPolicyFlag
as
transferPolicyFlag
-- 3
,
transrenewFlag
as
transrenewFlag
-- 4
,
recordClerkCode
as
recordClerkCode
-- 5
,
policyCreatDate
as
policyCreatDate
from
ODS
.
SOURCE_RMQ_POLICY_PRD
.
POLICY
-- 保单业务数据
;
...
...
ZB_CK/同步脚本/ZB_CK_KAFKA_CBDATA.sql
0 → 100644
View file @
11a6713f
-- ZB_CK_KAFKA_CBDATA ZB_CK_承保清单KAFKA
insert
into
ZB_CK
.
ZB_CK_MYSQL
.
KAFKA_CBDATA
select
`uwConclueDate`
,
`startTime`
,
`COMCODE`
,
`COMNAME`
,
`LEVEL1COMCODE`
,
`LEVEL2COMCODE`
,
`LEVEL3COMCODE`
,
`LEVEL4COMCODE`
,
`LEVEL5COMCODE`
,
`LEVEL1COMDESC`
,
`LEVEL2COMDESC`
,
`LEVEL3COMDESC`
,
`LEVEL4COMDESC`
,
`LEVEL5COMDESC`
,
`risk`
,
`riskname`
,
`classcode`
,
`classname`
,
`chnl`
,
`chnlname`
,
`businessNatureCode`
,
`businessNatureName`
,
`cost`
,
`no`
,
`xxzflag`
,
`id`
,
`name`
,
log_time
from
ZB_ODS
.
ZB_ODS_KAFKA
.
CBDATA
where
uwConclueDate
between
'20220831'
and
'20220902'
-- and COMCODE = '54000000';
\ No newline at end of file
ZB_CK/同步脚本/ZB_CK_KAFKA_ENDOR.sql
0 → 100644
View file @
11a6713f
-- ZB_CK_KAFKA_ENDOR 批单清单KAFKA
insert
into
ZB_CK
.
ZB_CK_MYSQL
.
KAFKA_ENDOR
select
endorseNo
as
endorseNo
--0 批单号
,
LongTimeToStringUDF
(
uwConclueDate
,
'yyyyMMdd'
)
as
uwConclueDate
--1 核保通过时间 ??
,
LongTimeToStringUDF
(
plpEndorse
.
endorseEffectiveTime
,
'yyyyMMdd'
)
as
endorseEffectiveTime
--2 起保时间
,
businessOffice
as
businessOffice
--3 保单归属机构代码
,
productCode
as
productCode
--4 险种代码
,
businessChannelCode
as
businessChannelCode
--5 业务渠道
,
businessNatureCode
as
businessNatureCode
--6 业务来源
,
plpEndorse
.
netPremiumVariation
as
netPremiumVariation
--7 9月2日生效 保费变化量
,
sigAndStaExchangeRate
as
sigAndStaExchangeRate
--8
,
plpEndorse
.
staCurPremiumVariation
as
staCurPremiumVariation
--9
,
plcSolution
[
1
].
plcCoins
.
plcCoinsBasicInformation
[
1
].
coinsIdentity
as
coinsIdentity
--0
,
plcSolution
[
1
].
plcCoins
.
plcCoinsBasicInformation
[
1
].
coinsRate
as
coinsRate
--1
,
newPolicyFlag
as
newPolicyFlag
--2
,
autoTransrenewFlag
as
autoTransrenewFlag
--3
,
transferPolicyFlag
as
transferPolicyFlag
--4
,
transrenewFlag
as
transrenewFlag
--5
,
recordClerkCode
as
recordClerkCode
--6
,
policyCreatDate
as
policyCreatDate
from
ODS
.
ODS_KAFKA
.
ENDOR
where
LongTimeToStringUDF
(
uwConclueDate
,
'yyyyMMdd'
)
between
'20220831'
and
'20220902'
\ No newline at end of file
ZB_CK/同步脚本/ZB_CK_KAFKA_POLICY.sql
0 → 100644
View file @
11a6713f
-- ZB_CK_KAFKA_POLICY 保单清单kafka
insert
into
ZB_CK
.
ZB_CK_MYSQL
.
KAFKA_POLICY
select
policyNo
as
policyNo
-- 0
,
LongTimeToStringUDF
(
uwConclueDate
,
'yyyyMMdd'
)
as
uwConclueDate
-- 1
,
LongTimeToStringUDF
(
startTime
,
'yyyyMMdd'
)
as
startTime
-- 2
,
businessOffice
as
businessOffice
-- 3
,
productCode
as
productCode
-- 4
,
businessChannelCode
as
businessChannelCode
-- 5
,
businessNatureCode
as
businessNatureCode
-- 6
,
netPremium
as
netPremium
-- 7
,
sigAndStaExchangeRate
as
sigAndStaExchangeRate
-- 8
,
plcSolution
[
1
].
plcCoins
.
plcCoinsBasicInformation
[
1
].
coinsIdentity
as
coinsIdentity
-- 9
,
plcSolution
[
1
].
plcCoins
.
plcCoinsBasicInformation
[
1
].
coinsRate
as
coinsRate
-- 0
,
newPolicyFlag
as
newPolicyFlag
-- 1
,
autoTransrenewFlag
as
autoTransrenewFlag
-- 2
,
transferPolicyFlag
as
transferPolicyFlag
-- 3
,
transrenewFlag
as
transrenewFlag
-- 4
,
recordClerkCode
as
recordClerkCode
-- 5
,
policyCreatDate
as
policyCreatDate
from
ODS
.
ODS_KAFKA
.
POLICY
-- 保单业务数据
where
LongTimeToStringUDF
(
uwConclueDate
,
'yyyyMMdd'
)
between
'20220831'
and
'20220902'
;
ZB_CK/同步脚本/test_dataquery_zb_cbdata.sql
deleted
100644 → 0
View file @
d06c2b43
create
table
cbdata
(
uwConclueDate
varchar
(
256
)
,
startTime
varchar
(
256
)
,
COMCODE
varchar
(
256
)
,
LEVEL1COMCODE
varchar
(
256
)
,
LEVEL2COMCODE
varchar
(
256
)
,
LEVEL3COMCODE
varchar
(
256
)
,
LEVEL4COMCODE
varchar
(
256
)
,
LEVEL5COMCODE
varchar
(
256
)
,
risk
varchar
(
256
)
,
classcode
varchar
(
256
)
,
chnl
varchar
(
256
)
,
businessNatureCode
varchar
(
256
)
,
cost
varchar
(
256
)
,
`no`
varchar
(
256
)
,
xxzflag
varchar
(
256
)
,
id
varchar
(
256
)
,
log_time
varchar
(
256
)
)
WITH
(
'properties.bootstrap.servers'
=
'9.23.23.75:9092,9.23.23.76:9092,9.23.23.77:9092,9.23.23.78:9092'
,
'scan.startup.mode'
=
'earliest-offset'
,
'topic'
=
'CBDATA'
,
'format'
=
'json'
,
'properties.group.id'
=
'20220818'
,
'connector'
=
'kafka'
);
create
table
test_cbdata
(
uwConclueDate
varchar
(
256
)
,
startTime
varchar
(
256
)
,
COMCODE
varchar
(
256
)
,
LEVEL1COMCODE
varchar
(
256
)
,
LEVEL2COMCODE
varchar
(
256
)
,
LEVEL3COMCODE
varchar
(
256
)
,
LEVEL4COMCODE
varchar
(
256
)
,
LEVEL5COMCODE
varchar
(
256
)
,
risk
varchar
(
256
)
,
classcode
varchar
(
256
)
,
chnl
varchar
(
256
)
,
businessNatureCode
varchar
(
256
)
,
cost
varchar
(
256
)
,
`no`
varchar
(
256
)
,
xxzflag
varchar
(
256
)
,
id
varchar
(
256
)
,
log_time
varchar
(
256
)
)
WITH
(
'url'
=
'jdbc:mysql://9.1.200.87:3306/life_test?useTimezone=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false'
,
'table-name'
=
'test_cbdata'
,
'username'
=
'service'
,
'password'
=
'ydwf12356aA!'
,
'scan.fetch-size'
=
'1000'
,
'sink.buffer-flush.max-rows'
=
'200'
,
'connector'
=
'jdbc'
);
insert
into
test_cbdata
select
*
from
cbdata
where
uwConclueDate
between
'20220830'
and
'20220901'
-- and COMCODE = '54000000';
\ No newline at end of file
ZB_CK/同步脚本/test_dataquery_zb_endor_trans.sql
deleted
100644 → 0
View file @
d06c2b43
create
table
mq_test_endor
(
endorseNo
String
,
-- 1 批单号
businessOffice
String
,
-- 新核心车险批单-保单归属机构代码
productCode
String
,
-- 新核心车险批单-险种代码
businessNatureCode
String
,
-- 新核心车险批单-业务来源
channelType
String
,
-- 5 渠道类型
uwConclueDate
String
,
-- 6 核批完成时间
plpEndorse
row
(
endorseEffectiveTime
String
,
-- 7 批单生效日期
staCurAmountVariation
String
,
-- 10 变化保险金额
staCurPremiumVariation
String
,
-- 11 不含税变化保险费
staCurNetPremiumVariation
String
,
-- 12 含税变化保险费
staCurTaxFeeVariation
String
,
-- 13 税
plpCommissionDetail
array
<
row
(
agentFeeVariation
String
,
-- 16 份额含税手续费变化量
agentNetFeeVariation
String
-- 17 份额不含税手续费变化量
)
>
,
netPremiumVariation
String
-- 保费变化量
),
recordClerkCode
String
,
-- 14 归属业务员ID
recordClerkName
String
,
-- 15 归属业务员名称
businessChannelCode
String
,
-- 27 新核心车险批单-清分后渠道
businessChannelName
String
,
-- 28 业务渠道名
newPolicyFlag
String
,
-- 20 新核心车险批单-新保标识 1:是,0:否
autoTransrenewFlag
String
,
-- 21 新核心车险批单-自动续保标识 1:是,4:跨险种自动续保,0:否
transferPolicyFlag
String
,
-- 22 新核心车险批单-转保标识1:是,0:否
transrenewFlag
String
,
-- 23 新核心车险批单-续保标识 1:是,4:跨险种续保,0:否
policyCreatDate
String
,
-- 新核心车险批单-核保通过时间
plcSolution
array
<
row
(
plcCoins
row
(
plcCoinsBasicInformation
array
<
row
(
coinsRate
String
,
-- 非车险共保比例
coinsIdentity
String
-- 共保我方标记 = 1 时共保我方
)
>
),
PlcRation
row
(
artifSelfPricesRat
String
,
-- 新核心车险批单-自主定价系数
artifReviewPrem
String
-- 新核心车险批单-总保费
),
plcCommissionDetail
array
<
row
(
agentFee
String
,
-- 新核心车险批单-手续费含税金额
agentNetFee
String
-- 新核心车险批单-手续费不含税金额
)
>
)
>
,
policyNo
String
,
-- 新核心车险批单-保单号
businessOfficeName
String
,
-- 新核心车险批单-保单归属机构名称
startTime
String
,
-- 新核心车险批单-起保时间
endTime
String
,
-- 新核心车险批单-终保时间
netPremium
String
,
-- 新核心车险批单-不含税保费
premium
String
,
-- 新核心车险批单-含税保费
plcCar05
row
(
licensePlateNo
String
,
-- 新核心车险批单-车牌号
frameNo
String
,
-- 新核心车险批单-车架号
vehicleId
String
,
-- 新核心车险批单-车型
newVehicleFlag
String
,
-- 新核心车险批单-新车标识
carUserNatureCode
String
,
-- 新核心车险批单-车辆使用性质
carKindCode
String
-- 新核心车险批单-车辆种类
),
plcApplicant
array
<
row
(
customerName
String
-- 新核心车险批单-投保人名称
)
>
,
plcPublicInsurant
array
<
row
(
customerName
String
-- 新核心车险批单-被保人名称
)
>
,
saleaman
String
,
-- 新核心车险批单-代理机构代码
saleamanName
String
,
-- 新核心车险批单-代理机构名称
policySort
String
,
-- 新核心车险批单-保单种类
sigAndStaExchangeRate
String
-- 8 到人民币汇率 除了粤港车,车险没有存汇率,模型默认0
)
WITH
(
-- 'host' = '9.23.28.35',
-- 'port' = '5672',
-- 'user' = 'test',
-- 'password' = 'cG9saWN5LVJhYmJpdE1R',
-- 'vhost' = '/',
-- 'queue' = 'ENDOR_GENERATE_FANOUT_MESSAGE_QUEUE_D030',
-- 'durable'='true',
-- 'format'='json',
-- 'connector' = 'rabbitmq-ddl'
-- earliest-offset/latest-offset/group-offsets/specific-offsets/timestamp
'scan.startup.mode'
=
'earliest-offset'
,
'connector'
=
'kafka'
,
'topic'
=
'ENDOR'
,
'properties.bootstrap.servers'
=
'9.23.23.75:9092,9.23.23.76:9092,9.23.23.77:9092,9.23.23.78:9092'
,
'format'
=
'json'
,
'json.ignore-parse-errors'
=
'false'
,
-- 消费
'properties.group.id'
=
'testGroup_2022040201'
);
CREATE
TABLE
test_endor_trans
(
endorseNo
varchar
(
64
)
,
uwConclueDate
varchar
(
64
)
,
endorseEffectiveTime
varchar
(
64
)
,
businessOffice
varchar
(
64
)
,
productCode
varchar
(
64
)
,
businessChannelCode
varchar
(
64
)
,
businessNatureCode
varchar
(
64
)
,
netPremiumVariation
varchar
(
64
)
,
sigAndStaExchangeRate
varchar
(
64
)
,
staCurPremiumVariation
varchar
(
64
)
,
coinsIdentity
varchar
(
64
)
,
coinsRate
varchar
(
64
)
,
newPolicyFlag
varchar
(
64
)
,
autoTransrenewFlag
varchar
(
64
)
,
transferPolicyFlag
varchar
(
64
)
,
transrenewFlag
varchar
(
64
)
,
recordClerkCode
varchar
(
64
)
)
WITH
(
'url'
=
'jdbc:mysql://9.1.200.87:3306/life_test?useTimezone=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false'
,
'table-name'
=
'test_endor_trans'
,
'username'
=
'service'
,
'password'
=
'ydwf12356aA!'
,
'scan.fetch-size'
=
'1000'
,
'sink.buffer-flush.max-rows'
=
'200'
,
'connector'
=
'jdbc'
);
insert
into
test_endor_trans
select
endorseNo
as
endorseNo
--0 批单号
,
LongTimeToStringUDF
(
uwConclueDate
,
'yyyyMMdd'
)
as
uwConclueDate
--1 核保通过时间 ??
,
LongTimeToStringUDF
(
plpEndorse
.
endorseEffectiveTime
,
'yyyyMMdd'
)
as
endorseEffectiveTime
--2 起保时间
,
businessOffice
as
businessOffice
--3 保单归属机构代码
,
productCode
as
productCode
--4 险种代码
,
businessChannelCode
as
businessChannelCode
--5 业务渠道
,
businessNatureCode
as
businessNatureCode
--6 业务来源
,
plpEndorse
.
netPremiumVariation
as
netPremiumVariation
--7 9月2日生效 保费变化量
,
sigAndStaExchangeRate
as
sigAndStaExchangeRate
--8
,
plpEndorse
.
staCurPremiumVariation
as
staCurPremiumVariation
--9
,
plcSolution
[
1
].
plcCoins
.
plcCoinsBasicInformation
[
1
].
coinsIdentity
as
coinsIdentity
--0
,
plcSolution
[
1
].
plcCoins
.
plcCoinsBasicInformation
[
1
].
coinsRate
as
coinsRate
--1
,
newPolicyFlag
as
newPolicyFlag
--2
,
autoTransrenewFlag
as
autoTransrenewFlag
--3
,
transferPolicyFlag
as
transferPolicyFlag
--4
,
transrenewFlag
as
transrenewFlag
--5
,
recordClerkCode
as
recordClerkCode
--6
from
mq_test_endor
where
LongTimeToStringUDF
(
uwConclueDate
,
'yyyyMMdd'
)
between
'20220830'
and
'20220901'
\ No newline at end of file
ZB_CK/同步脚本/test_dataquery_zb_plicy_trans.sql
deleted
100644 → 0
View file @
d06c2b43
create
table
mq_test_policy
(
endorseNo
String
,
-- 1 批单号
policyNo
String
,
-- 2 保单号
businessNo
String
,
-- 3 业务号
uwConclueDate
String
,
-- 4 核保通过时间
businessOffice
String
,
-- 5 保单归属机构代码
businessOfficeName
String
,
-- 6 保单归属机构名称
productCode
String
,
-- 7 险种代码
businessNatureCode
String
,
-- 8 业务来源
startTime
String
,
-- 9 起保时间
endTime
String
,
-- 10 终保时间
netPremium
String
,
-- 11 不含税保费
premium
String
,
-- 12 含税保费
plcCar05
row
(
licensePlateNo
String
,
-- 13 车牌号
frameNo
String
,
-- 14 车架号
vehiclecode
String
,
-- 15 行业车型代码
carBrandCode
String
,
-- 16 厂牌型号
newCarFlag
String
,
-- 17 新车标识 1:新车,0:旧车
carKindCode
String
,
-- 29 车辆种类代码
carKindName
String
,
-- 30 车辆种类名称
carUserNatureCode
String
,
-- 31 车辆使用性质代码
carUserNature
String
,
-- 32 车辆使用性质名称
vehicleId
String
,
-- 新核心车险保单-车型
newVehicleFlag
String
,
-- 新核心车险保单-新车标识
actualvalue
String
-- 新核心车险保单-实际价值
),
plcApplicant
array
<
row
(
customerName
String
-- 18 投保人名称
)
>
,
plcPublicInsurant
array
<
row
(
customerName
String
-- 19 被保人名称
)
>
,
newPolicyFlag
String
,
-- 20 新保标识 1:是,0:否
autoTransrenewFlag
String
,
-- 21 自动续保标识 1:是,4:跨险种自动续保,0:否
transferPolicyFlag
String
,
-- 22 转保标识1:是,0:否
transrenewFlag
String
,
-- 23 续保标识 1:是,4:跨险种续保,0:否
plcSolution
array
<
row
(
PlcRation
row
(
artifSelfPricesRat
String
,
-- 24 自主定价系数
artifReviewPrem
String
-- 新核心车险保单-总保费
),
plcCoins
row
(
--String类型 该对象部分参数在某些数据中可能不存在 自定义函数 JsonValuUDF读取
plcCoinsBasicInformation
array
<
row
(
coinsRate
String
,
-- 非车险共保比例
coinsIdentity
String
-- 共保我方标记 = 1 时共保我方
)
>
),
plcCommissionDetail
array
<
row
(
agentFee
String
,
-- 36 份额含税手续费
agentNetFee
String
-- 37 份额不含税手续费
)
>
)
>
,
saleaman
String
,
-- 25 代理机构代码
saleamanName
String
,
-- 26 代理机构名称
businessChannelCode
String
,
-- 27 业务渠道
businessChannelName
String
,
-- 28 业务渠道名
recordClerkCode
String
,
-- 34 归属业务员ID
recordClerkName
String
,
-- 35 归属业务员名称
staCurAmount
String
,
-- 38 保险金额
staCurTaxFee
String
,
-- 39 税
policyCreatDate
String
,
-- 保单创建时间
sigAndStaExchangeRate
String
,
-- 费率
policySort
String
,
-- 新核心车险保单-保单种类
businessType
String
-- 新核心车险保单-业务类型
)
WITH
(
-- earliest-offset/latest-offset/group-offsets/specific-offsets/timestamp
'scan.startup.mode'
=
'earliest-offset'
,
'connector'
=
'kafka'
,
'topic'
=
'POLICY'
,
'properties.bootstrap.servers'
=
'9.23.23.75:9092,9.23.23.76:9092,9.23.23.77:9092,9.23.23.78:9092'
,
'format'
=
'json'
,
'json.ignore-parse-errors'
=
'false'
,
-- 消费
'properties.group.id'
=
'testGroup_2022040201'
);
CREATE
TABLE
test_policy_trans
(
policyNo
varchar
(
64
)
,
uwConclueDate
varchar
(
64
)
,
startTime
varchar
(
64
)
,
businessOffice
varchar
(
64
)
,
productCode
varchar
(
64
)
,
businessChannelCode
varchar
(
64
)
,
businessNatureCode
varchar
(
64
)
,
netPremium
varchar
(
64
)
,
sigAndStaExchangeRate
varchar
(
64
)
,
coinsIdentity
varchar
(
64
)
,
coinsRate
varchar
(
64
)
,
newPolicyFlag
varchar
(
64
)
,
autoTransrenewFlag
varchar
(
64
)
,
transferPolicyFlag
varchar
(
64
)
,
transrenewFlag
varchar
(
64
)
,
recordClerkCode
varchar
(
64
)
)
WITH
(
'url'
=
'jdbc:mysql://9.1.200.87:3306/life_test?useTimezone=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false'
,
'table-name'
=
'test_policy_trans'
,
'username'
=
'service'
,
'password'
=
'ydwf12356aA!'
,
'scan.fetch-size'
=
'1000'
,
'sink.buffer-flush.max-rows'
=
'200'
,
'connector'
=
'jdbc'
);
insert
into
test_policy_trans
select
policyNo
as
policyNo
-- 0
,
LongTimeToStringUDF
(
uwConclueDate
,
'yyyyMMdd'
)
as
uwConclueDate
-- 1
,
LongTimeToStringUDF
(
startTime
,
'yyyyMMdd'
)
as
startTime
-- 2
,
businessOffice
as
businessOffice
-- 3
,
productCode
as
productCode
-- 4
,
businessChannelCode
as
businessChannelCode
-- 5
,
businessNatureCode
as
businessNatureCode
-- 6
,
netPremium
as
netPremium
-- 7
,
sigAndStaExchangeRate
as
sigAndStaExchangeRate
-- 8
,
plcSolution
[
1
].
plcCoins
.
plcCoinsBasicInformation
[
1
].
coinsIdentity
as
coinsIdentity
-- 9
,
plcSolution
[
1
].
plcCoins
.
plcCoinsBasicInformation
[
1
].
coinsRate
as
coinsRate
-- 0
,
newPolicyFlag
as
newPolicyFlag
-- 1
,
autoTransrenewFlag
as
autoTransrenewFlag
-- 2
,
transferPolicyFlag
as
transferPolicyFlag
-- 3
,
transrenewFlag
as
transrenewFlag
-- 4
,
recordClerkCode
as
recordClerkCode
-- 5
from
mq_test_policy
-- 保单业务数据
where
LongTimeToStringUDF
(
uwConclueDate
,
'yyyyMMdd'
)
between
'20220830'
and
'20220901'
;
ZB_ODS/DDL元数据/CBDATA.sql
View file @
11a6713f
...
@@ -28,6 +28,6 @@ create table CBDATA(
...
@@ -28,6 +28,6 @@ create table CBDATA(
`xxzflag`
String
,
-- 新续转标记 1是0否
`xxzflag`
String
,
-- 新续转标记 1是0否
`id`
String
,
-- 14 归属业务员ID
`id`
String
,
-- 14 归属业务员ID
`name`
String
,
-- 15 归属业务员名称
`name`
String
,
-- 15 归属业务员名称
log_time
String
log_time
String
)
)
;
;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment