线上问诊:数仓开发(二)
系列文章目录
线上问诊:业务数据采集
线上问诊:数仓数据同步
线上问诊:数仓开发(一)
线上问诊:数仓开发(二)
文章目录
- 系列文章目录
- 前言
- 一、DWS
- 1.最近1日汇总表
- 1.交易域医院患者性别年龄段粒度问诊最近1日汇总表
- 2.交易域医院患者性别年龄段粒度问诊支付成功最近1日汇总表
- 3.交易域医院患者性别年龄段粒度处方开单最近1日汇总表
- 4.交易域医院患者性别年龄段粒度处方开单支付成功最近1日汇总表
- 5.交易域医生粒度问诊最近1日汇总表
- 6.首日装载脚本
- 7.每日数据装载
- 2.最近n日汇总表
- 1.交易域医院患者性别年龄段粒度问诊最近n日汇总表
- 2.交易域医院患者性别年龄段粒度问诊支付成功最近n日汇总表
- 3.交易域医院患者性别年龄段粒度处方开单最近n日汇总表
- 4.交易域医院患者性别年龄段粒度处方开单支付成功最近n日汇总表
- 5.交易域医生粒度问诊最近n日汇总表
- 6.首日装载脚本
- 3.历史至今汇总表
- 1.交易域医生粒度问诊历史至今汇总表
- 2.互动域医院用户粒度用户评价历史至今汇总表
- 3.互动域医院粒度用户评价历史至今汇总表
- 4.首日数据装载
- 5.每日数据装载
- 总结
前言
我们这次博客继续完成数仓的开发
一、DWS
1.最近1日汇总表
1.交易域医院患者性别年龄段粒度问诊最近1日汇总表
建表语句
CREATE EXTERNAL TABLE IF NOT EXISTS dws_trade_hospital_gender_age_group_consultation_1d
(`hospital_id` STRING COMMENT '医院ID',`hospital_name` STRING COMMENT '医院名称',`gender_code` STRING COMMENT '患者性别编码',`gender` STRING COMMENT '患者性别',`age_group` STRING COMMENT '年龄段:[0,2]婴儿期, [3,5]幼儿期, [6,11]小学阶段, [12,17]青少年期(中学阶段), [18-29]青年期, [30-59]中年期, [60-122]老年期',`consultation_amount` DECIMAL(16, 2) COMMENT '问诊金额',`consultation_count` BIGINT COMMENT '问诊次数'
) COMMENT '交易域医院患者性别年龄段粒度问诊最近1日汇总表'PARTITIONED BY (`dt` STRING)STORED AS ORCLOCATION '/warehouse/medical/dws/dws_trade_hospital_gender_age_group_consultation_1d'TBLPROPERTIES ('orc.compress' = 'snappy');
2.交易域医院患者性别年龄段粒度问诊支付成功最近1日汇总表
建表语句
CREATE EXTERNAL TABLE IF NOT EXISTS dws_trade_hospital_gender_age_group_consultation_pay_suc_1d
(`hospital_id` STRING COMMENT '医院ID',`hospital_name` STRING COMMENT '医院名称',`gender_code` STRING COMMENT '患者性别编码',`gender` STRING COMMENT '患者性别',`age_group` STRING COMMENT '年龄段:[0,2]婴儿期, [3,5]幼儿期, [6,11]小学阶段, [12,17]青少年期(中学阶段), [18-29]青年期, [30-59]中年期, [60-]老年期',`consultation_pay_suc_amount` DECIMAL(16, 2) COMMENT '问诊支付成功金额',`consultation_pay_suc_count` BIGINT COMMENT '问诊支付成功次数'
) COMMENT '交易域医院患者性别年龄段粒度问诊支付成功最近1日汇总表'PARTITIONED BY (`dt` STRING)STORED AS ORCLOCATION '/warehouse/medical/dws/dws_trade_hospital_gender_age_group_consultation_pay_suc_1d'TBLPROPERTIES ('orc.compress' = 'snappy');
3.交易域医院患者性别年龄段粒度处方开单最近1日汇总表
建表语句
CREATE EXTERNAL TABLE IF NOT EXISTS dws_trade_hospital_gender_age_group_prescription_1d
(`hospital_id` STRING COMMENT '医院ID',`hospital_name` STRING COMMENT '医院名称',`gender_code` STRING COMMENT '患者性别编码',`gender` STRING COMMENT '患者性别',`age_group` STRING COMMENT '年龄段:[0,2]婴儿期, [3,5]幼儿期, [6,11]小学阶段, [12,17]青少年期(中学阶段), [18-29]青年期, [30-59]中年期, [60-]老年期',`prescription_amount` DECIMAL(16, 2) COMMENT '处方开单金额',`prescription_count` BIGINT COMMENT '处方开单次数'
) COMMENT '交易域医院患者性别年龄段粒度处方开单最近1日汇总表'PARTITIONED BY (`dt` STRING)STORED AS ORCLOCATION '/warehouse/medical/dws/dws_trade_hospital_gender_age_group_prescription_1d'TBLPROPERTIES ('orc.compress' = 'snappy');
4.交易域医院患者性别年龄段粒度处方开单支付成功最近1日汇总表
建表语句
CREATE EXTERNAL TABLE IF NOT EXISTS dws_trade_hospital_gender_age_group_prescription_pay_suc_1d
(`hospital_id` STRING COMMENT '医院ID',`hospital_name` STRING COMMENT '医院名称',`gender_code` STRING COMMENT '患者性别编码',`gender` STRING COMMENT '患者性别',`age_group` STRING COMMENT '年龄段:[0,2]婴儿期, [3,5]幼儿期, [6,11]小学阶段, [12,17]青少年期(中学阶段), [18-29]青年期, [30-59]中年期, [60-]老年期',`prescription_pay_suc_amount` DECIMAL(16, 2) COMMENT '处方开单支付成功金额',`prescription_pay_suc_count` BIGINT COMMENT '处方开单支付成功次数'
) COMMENT '交易域医院患者性别年龄段粒度处方开单支付成功最近1日汇总表'PARTITIONED BY (`dt` STRING)STORED AS ORCLOCATION '/warehouse/medical/dws/dws_trade_hospital_gender_age_group_prescription_pay_suc_1d'TBLPROPERTIES ('orc.compress' = 'snappy');
5.交易域医生粒度问诊最近1日汇总表
建表语句
CREATE EXTERNAL TABLE IF NOT EXISTS dws_trade_doctor_consultation_1d
(`doctor_id` STRING COMMENT '医生ID',`doctor_name` STRING COMMENT '医生姓名',`consultation_count` BIGINT COMMENT '接诊次数'
) COMMENT '交易域医生粒度问诊最近1日汇总表'PARTITIONED BY (`dt` STRING)STORED AS ORCLOCATION '/warehouse/medical/dws/dws_trade_doctor_consultation_1d'TBLPROPERTIES ('orc.compress' = 'snappy');
6.首日装载脚本
vim ~/bin/medical_dwd_to_dws_1d_init.sh
#!/bin/bashAPP=medicalif [ -n $2 ]
then do_date=$2
elseecho "请传入日期参数!!!"exit
fidws_trade_hospital_gender_age_group_consultation_1d="
set hive.exec.dynamic.partition.mode=nonstrict;
insert overwrite table ${APP}.dws_trade_hospital_gender_age_group_consultation_1dpartition (dt)
select hospital_id,hospital_name,gender_code,gender,age_group,sum(consultation_fee) consultation_amount,count(*) consultation_count,dt
from (select hospital_id,hospital_name,gender_code,gender,casewhen age >= 0 and age <= 2 then '婴儿期'when age >= 3 and age <= 5 then '幼儿期'when age >= 6 and age <= 11 then '小学阶段'when age >= 12 and age <= 17 then '青少年期(中学阶段)'when age >= 18 and age <= 29 then '青年期'when age >= 30 and age <= 59 then '中年期'when age >= 60 and age <= 122 then '老年期'else '年龄异常' end age_group,consultation_fee,dtfrom (select doctor_id,patient_id,consultation_fee,dtfrom ${APP}.dwd_trade_consultation_inc) consulleft join(select id,hospital_idfrom ${APP}.dim_doctor_fullwhere dt = '$do_date') docon doctor_id = doc.idleft join (select id,name hospital_namefrom ${APP}.dim_hospital_fullwhere dt = '$do_date') hoson doc.hospital_id = hos.idleft join(select id,gender_code,gender,year('$do_date') - year(birthday) agefrom ${APP}.dim_patient_fullwhere dt = '$do_date') patienton patient_id = patient.id) with_group
group by hospital_id,hospital_name,gender_code,gender,age_group,dt;
"dws_trade_hospital_gender_age_group_consultation_pay_suc_1d="
set hive.exec.dynamic.partition.mode=nonstrict;
insert overwrite table ${APP}.dws_trade_hospital_gender_age_group_consultation_pay_suc_1dpartition (dt)
select hospital_id,hospital_name,gender_code,gender,age_group,sum(consultation_fee) consultation_pay_suc_amount,count(*) consultation_pay_suc_count,dt
from (select hospital_id,hospital_name,gender_code,gender,casewhen age >= 0 and age <= 2 then '婴儿期'when age >= 3 and age <= 5 then '幼儿期'when age >= 6 and age <= 11 then '小学阶段'when age >= 12 and age <= 17 then '青少年期(中学阶段)'when age >= 18 and age <= 29 then '青年期'when age >= 30 and age <= 59 then '中年期'when age >= 60 and age <= 122 then '老年期'else '年龄异常' end age_group,consultation_fee,dtfrom (select doctor_id,patient_id,consultation_fee,dtfrom ${APP}.dwd_trade_consultation_pay_suc_inc) consulleft join(select id,hospital_idfrom ${APP}.dim_doctor_fullwhere dt = '$do_date') docon doctor_id = doc.idleft join (select id,name hospital_namefrom ${APP}.dim_hospital_fullwhere dt = '$do_date') hoson doc.hospital_id = hos.idleft join(select id,gender_code,gender,year('$do_date') - year(birthday) agefrom ${APP}.dim_patient_fullwhere dt = '$do_date') patienton patient_id = patient.id) with_group
group by hospital_id,hospital_name,gender_code,gender,age_group,dt;
"dws_trade_hospital_gender_age_group_prescription_1d="
set hive.exec.dynamic.partition.mode=nonstrict;
insert overwrite table ${APP}.dws_trade_hospital_gender_age_group_prescription_1dpartition (dt)
select hospital_id,hospital_name,gender_code,gender,age_group,sum(total_amount) prescription_amount,count(*) prescription_count,dt
from (select hospital_id,hospital_name,gender_code,gender,casewhen age >= 0 and age <= 2 then '婴儿期'when age >= 3 and age <= 5 then '幼儿期'when age >= 6 and age <= 11 then '小学阶段'when age >= 12 and age <= 17 then '青少年期(中学阶段)'when age >= 18 and age <= 29 then '青年期'when age >= 30 and age <= 59 then '中年期'when age >= 60 and age <= 122 then '老年期'else '年龄异常' end age_group,total_amount,dtfrom (select max(doctor_id) doctor_id,max(patient_id) patient_id,max(total_amount) total_amount,max(dt) dtfrom ${APP}.dwd_trade_prescription_incgroup by prescription_id) prescrleft join(select id,hospital_idfrom ${APP}.dim_doctor_fullwhere dt = '$do_date') docon doctor_id = doc.idleft join (select id,name hospital_namefrom ${APP}.dim_hospital_fullwhere dt = '$do_date') hoson doc.hospital_id = hos.idleft join(select id,gender_code,gender,year('$do_date') - year(birthday) agefrom ${APP}.dim_patient_fullwhere dt = '$do_date') patienton patient_id = patient.id) with_group
group by hospital_id,hospital_name,gender_code,gender,age_group,dt;
"dws_trade_hospital_gender_age_group_prescription_pay_suc_1d="
set hive.exec.dynamic.partition.mode=nonstrict;
insert overwrite table ${APP}.dws_trade_hospital_gender_age_group_prescription_pay_suc_1dpartition (dt)
select hospital_id,hospital_name,gender_code,gender,age_group,sum(total_amount) prescription_pay_suc_amount,count(*) prescription_pay_suc_count,dt
from (select hospital_id,hospital_name,gender_code,gender,casewhen age >= 0 and age <= 2 then '婴儿期'when age >= 3 and age <= 5 then '幼儿期'when age >= 6 and age <= 11 then '小学阶段'when age >= 12 and age <= 17 then '青少年期(中学阶段)'when age >= 18 and age <= 29 then '青年期'when age >= 30 and age <= 59 then '中年期'when age >= 60 and age <= 122 then '老年期'else '年龄异常' end age_group,total_amount,dtfrom (select max(doctor_id) doctor_id,max(patient_id) patient_id,max(total_amount) total_amount,max(dt) dtfrom ${APP}.dwd_trade_prescription_pay_suc_incgroup by prescription_id) prescrleft join(select id,hospital_idfrom ${APP}.dim_doctor_fullwhere dt = '$do_date') docon doctor_id = doc.idleft join (select id,name hospital_namefrom ${APP}.dim_hospital_fullwhere dt = '$do_date') hoson doc.hospital_id = hos.idleft join(select id,gender_code,gender,year('$do_date') - year(birthday) agefrom ${APP}.dim_patient_fullwhere dt = '$do_date') patienton patient_id = patient.id) with_group
group by hospital_id,hospital_name,gender_code,gender,age_group,dt;
"dws_trade_doctor_consultation_1d="
set hive.exec.dynamic.partition.mode=nonstrict;
insert overwrite table ${APP}.dws_trade_doctor_consultation_1dpartition (dt)
select doctor_id,name doctor_name,consultation_count,dt
from (select doctor_id,dt,count(*) consultation_countfrom ${APP}.dwd_trade_consultation_incgroup by doctor_id,dt) avgleft join (select id,namefrom ${APP}.dim_doctor_fullwhere dt = '$do_date') docon avg.doctor_id = doc.id;
"case $1 indws_trade_hospital_gender_age_group_consultation_1d | dws_trade_hospital_gender_age_group_consultation_pay_suc_1d | dws_trade_hospital_gender_age_group_prescription_1d | dws_trade_hospital_gender_age_group_prescription_pay_suc_1d | dws_trade_doctor_consultation_1d)hive -e "${!1}";;"all")hive -e "$dws_trade_hospital_gender_age_group_consultation_1d$dws_trade_hospital_gender_age_group_consultation_pay_suc_1d$dws_trade_hospital_gender_age_group_prescription_1d$dws_trade_hospital_gender_age_group_prescription_pay_suc_1d$dws_trade_doctor_consultation_1d";;
esac
添加权限
chmod +x ~/bin/medical_dwd_to_dws_1d_init.sh
数据载入
medical_dwd_to_dws_1d_init.sh all 2023-05-09
随便找一个查看一下最后的日期
7.每日数据装载
vim ~/bin/medical_dwd_to_dws_1d.sh
#!/bin/bashAPP=medicalif [ -n $2 ]
then do_date=$2
elseecho "请传入日期参数!!!"exit
fidws_trade_hospital_gender_age_group_consultation_1d="
insert overwrite table ${APP}.dws_trade_hospital_gender_age_group_consultation_1dpartition (dt = '$do_date')
select hospital_id,hospital_name,gender_code,gender,age_group,sum(consultation_fee) consultation_amount,count(*) consultation_count
from (select hospital_id,hospital_name,gender_code,gender,casewhen age >= 0 and age <= 2 then '婴儿期'when age >= 3 and age <= 5 then '幼儿期'when age >= 6 and age <= 11 then '小学阶段'when age >= 12 and age <= 17 then '青少年期(中学阶段)'when age >= 18 and age <= 29 then '青年期'when age >= 30 and age <= 59 then '中年期'when age >= 60 and age <= 122 then '老年期'else '年龄异常' end age_group,consultation_feefrom (select doctor_id,patient_id,consultation_feefrom ${APP}.dwd_trade_consultation_incwhere dt = '$do_date') consulleft join(select id,hospital_idfrom ${APP}.dim_doctor_fullwhere dt = '$do_date') docon doctor_id = doc.idleft join (select id,name hospital_namefrom ${APP}.dim_hospital_fullwhere dt = '$do_date') hoson doc.hospital_id = hos.idleft join(select id,gender_code,gender,year('$do_date') - year(birthday) agefrom ${APP}.dim_patient_fullwhere dt = '$do_date') patienton patient_id = patient.id) with_group
group by hospital_id,hospital_name,gender_code,gender,age_group;"dws_trade_hospital_gender_age_group_consultation_pay_suc_1d="
insert overwrite table ${APP}.dws_trade_hospital_gender_age_group_consultation_pay_suc_1dpartition (dt = '$do_date')
select hospital_id,hospital_name,gender_code,gender,age_group,sum(consultation_fee) consultation_pay_suc_amount,count(*) consultation_pay_suc_count
from (select hospital_id,hospital_name,gender_code,gender,casewhen age >= 0 and age <= 2 then '婴儿期'when age >= 3 and age <= 5 then '幼儿期'when age >= 6 and age <= 11 then '小学阶段'when age >= 12 and age <= 17 then '青少年期(中学阶段)'when age >= 18 and age <= 29 then '青年期'when age >= 30 and age <= 59 then '中年期'when age >= 60 and age <= 122 then '老年期'else '年龄异常' end age_group,consultation_feefrom (select doctor_id,patient_id,consultation_feefrom ${APP}.dwd_trade_consultation_pay_suc_incwhere dt = '$do_date') consulleft join(select id,hospital_idfrom ${APP}.dim_doctor_fullwhere dt = '$do_date') docon doctor_id = doc.idleft join (select id,name hospital_namefrom ${APP}.dim_hospital_fullwhere dt = '$do_date') hoson doc.hospital_id = hos.idleft join(select id,gender_code,gender,year('$do_date') - year(birthday) agefrom ${APP}.dim_patient_fullwhere dt = '$do_date') patienton patient_id = patient.id) with_group
group by hospital_id,hospital_name,gender_code,gender,age_group;"dws_trade_hospital_gender_age_group_prescription_1d="
insert overwrite table ${APP}.dws_trade_hospital_gender_age_group_prescription_1dpartition (dt = '$do_date')
select hospital_id,hospital_name,gender_code,gender,age_group,sum(total_amount) prescription_amount,count(*) prescription_count
from (select hospital_id,hospital_name,gender_code,gender,casewhen age >= 0 and age <= 2 then '婴儿期'when age >= 3 and age <= 5 then '幼儿期'when age >= 6 and age <= 11 then '小学阶段'when age >= 12 and age <= 17 then '青少年期(中学阶段)'when age >= 18 and age <= 29 then '青年期'when age >= 30 and age <= 59 then '中年期'when age >= 60 and age <= 122 then '老年期'else '年龄异常' end age_group,total_amountfrom (select max(doctor_id) doctor_id,max(patient_id) patient_id,max(total_amount) total_amountfrom ${APP}.dwd_trade_prescription_incwhere dt = '$do_date'group by prescription_id) prescrleft join(select id,hospital_idfrom ${APP}.dim_doctor_fullwhere dt = '$do_date') docon doctor_id = doc.idleft join (select id,name hospital_namefrom ${APP}.dim_hospital_fullwhere dt = '$do_date') hoson doc.hospital_id = hos.idleft join(select id,gender_code,gender,year('$do_date') - year(birthday) agefrom ${APP}.dim_patient_fullwhere dt = '$do_date') patienton patient_id = patient.id) with_group
group by hospital_id,hospital_name,gender_code,gender,age_group;"dws_trade_hospital_gender_age_group_prescription_pay_suc_1d="
insert overwrite table ${APP}.dws_trade_hospital_gender_age_group_prescription_pay_suc_1dpartition (dt = '$do_date')
select hospital_id,hospital_name,gender_code,gender,age_group,sum(total_amount) prescription_pay_suc_amount,count(*) prescription_pay_suc_count
from (select hospital_id,hospital_name,gender_code,gender,casewhen age >= 0 and age <= 2 then '婴儿期'when age >= 3 and age <= 5 then '幼儿期'when age >= 6 and age <= 11 then '小学阶段'when age >= 12 and age <= 17 then '青少年期(中学阶段)'when age >= 18 and age <= 29 then '青年期'when age >= 30 and age <= 59 then '中年期'when age >= 60 and age <= 122 then '老年期'else '年龄异常' end age_group,total_amountfrom (select max(doctor_id) doctor_id,max(patient_id) patient_id,max(total_amount) total_amountfrom ${APP}.dwd_trade_prescription_incwhere dt = '$do_date'group by prescription_id) prescrleft join(select id,hospital_idfrom ${APP}.dim_doctor_fullwhere dt = '$do_date') docon doctor_id = doc.idleft join (select id,name hospital_namefrom ${APP}.dim_hospital_fullwhere dt = '$do_date') hoson doc.hospital_id = hos.idleft join(select id,gender_code,gender,year('$do_date') - year(birthday) agefrom ${APP}.dim_patient_fullwhere dt = '$do_date') patienton patient_id = patient.id) with_group
group by hospital_id,hospital_name,gender_code,gender,age_group;"dws_trade_doctor_consultation_1d="
insert overwrite table ${APP}.dws_trade_doctor_consultation_1dpartition (dt = '$do_date')
select doctor_id,name doctor_name,consultation_count
from (select doctor_id,count(*) consultation_countfrom ${APP}.dwd_trade_consultation_incwhere dt = '$do_date'group by doctor_id) avgleft join (select id,namefrom ${APP}.dim_doctor_fullwhere dt = '$do_date') docon avg.doctor_id = doc.id;"case $1 indws_trade_hospital_gender_age_group_consultation_1d | dws_trade_hospital_gender_age_group_consultation_pay_suc_1d | dws_trade_hospital_gender_age_group_prescription_1d | dws_trade_hospital_gender_age_group_prescription_pay_suc_1d | dws_trade_doctor_consultation_1d)hive -e "${!1}";;"all")hive -e "$dws_trade_hospital_gender_age_group_consultation_1d$dws_trade_hospital_gender_age_group_consultation_pay_suc_1d$dws_trade_hospital_gender_age_group_prescription_1d$dws_trade_hospital_gender_age_group_prescription_pay_suc_1d$dws_trade_doctor_consultation_1d";;
esac
添加权限
chmod +x ~/bin/medical_dwd_to_dws_1d.sh
2.最近n日汇总表
1.交易域医院患者性别年龄段粒度问诊最近n日汇总表
建表语句
CREATE EXTERNAL TABLE IF NOT EXISTS dws_trade_hospital_gender_age_group_consultation_nd
(`hospital_id` STRING COMMENT '医院ID',`hospital_name` STRING COMMENT '医院名称',`gender_code` STRING COMMENT '患者性别编码',`gender` STRING COMMENT '患者性别',`age_group` STRING COMMENT '年龄段:[0,2]婴儿期, [3,5]幼儿期, [6,11]小学阶段, [12,17]青少年期(中学阶段), [18-29]青年期, [30-59]中年期, [60-122]老年期',`consultation_amount_7d` DECIMAL(16, 2) COMMENT '最近 7 日问诊金额',`consultation_count_7d` BIGINT COMMENT '最近 7 日问诊次数',`consultation_amount_30d` DECIMAL(16, 2) COMMENT '最近 30 日问诊金额',`consultation_count_30d` BIGINT COMMENT '最近 30 日问诊次数'
) COMMENT '交易域医院患者性别年龄段粒度问诊最近n日汇总表'PARTITIONED BY (`dt` STRING)STORED AS ORCLOCATION '/warehouse/medical/dws/dws_trade_hospital_gender_age_group_consultation_nd'TBLPROPERTIES ('orc.compress' = 'snappy');
2.交易域医院患者性别年龄段粒度问诊支付成功最近n日汇总表
建表语句
CREATE EXTERNAL TABLE IF NOT EXISTS dws_trade_hospital_gender_age_group_consultation_pay_suc_nd
(`hospital_id` STRING COMMENT '医院ID',`hospital_name` STRING COMMENT '医院名称',`gender_code` STRING COMMENT '患者性别编码',`gender` STRING COMMENT '患者性别',`age_group` STRING COMMENT '年龄段:[0,2]婴儿期, [3,5]幼儿期, [6,11]小学阶段, [12,17]青少年期(中学阶段), [18-29]青年期, [30-59]中年期, [60-]老年期',`consultation_pay_suc_amount_7d` DECIMAL(16, 2) COMMENT '最近 7 日问诊支付成功金额',`consultation_pay_suc_count_7d` BIGINT COMMENT '最近 7 日问诊支付成功次数',`consultation_pay_suc_amount_30d` DECIMAL(16, 2) COMMENT '最近 30 日问诊支付成功金额',`consultation_pay_suc_count_30d` BIGINT COMMENT '最近 30 日问诊支付成功次数'
) COMMENT '交易域医院患者性别年龄段粒度问诊支付成功最近n日汇总表'PARTITIONED BY (`dt` STRING)STORED AS ORCLOCATION '/warehouse/medical/dws/dws_trade_hospital_gender_age_group_consultation_pay_suc_nd'TBLPROPERTIES ('orc.compress' = 'snappy');
3.交易域医院患者性别年龄段粒度处方开单最近n日汇总表
建表语句
CREATE EXTERNAL TABLE IF NOT EXISTS dws_trade_hospital_gender_age_group_prescription_nd
(`hospital_id` STRING COMMENT '医院ID',`hospital_name` STRING COMMENT '医院名称',`gender_code` STRING COMMENT '患者性别编码',`gender` STRING COMMENT '患者性别',`age_group` STRING COMMENT '年龄段:[0,2]婴儿期, [3,5]幼儿期, [6,11]小学阶段, [12,17]青少年期(中学阶段), [18-29]青年期, [30-59]中年期, [60-]老年期',`prescription_amount_7d` DECIMAL(16, 2) COMMENT '最近 7 日处方开单金额',`prescription_count_7d` BIGINT COMMENT '最近 7 日处方开单次数',`prescription_amount_30d` DECIMAL(16, 2) COMMENT '最近 30 日处方开单金额',`prescription_count_30d` BIGINT COMMENT '最近 30 日处方开单次数'
) COMMENT '交易域医院患者性别年龄段粒度处方开单最近n日汇总表'PARTITIONED BY (`dt` STRING)STORED AS ORCLOCATION '/warehouse/medical/dws/dws_trade_hospital_gender_age_group_prescription_nd'TBLPROPERTIES ('orc.compress' = 'snappy');
4.交易域医院患者性别年龄段粒度处方开单支付成功最近n日汇总表
建表语句
CREATE EXTERNAL TABLE IF NOT EXISTS dws_trade_hospital_gender_age_group_prescription_pay_suc_nd
(`hospital_id` STRING COMMENT '医院ID',`hospital_name` STRING COMMENT '医院名称',`gender_code` STRING COMMENT '患者性别编码',`gender` STRING COMMENT '患者性别',`age_group` STRING COMMENT '年龄段:[0,2]婴儿期, [3,5]幼儿期, [6,11]小学阶段, [12,17]青少年期(中学阶段), [18-29]青年期, [30-59]中年期, [60-]老年期',`prescription_pay_suc_amount_7d` DECIMAL(16, 2) COMMENT '最近 7 日处方开单支付成功金额',`prescription_pay_suc_count_7d` BIGINT COMMENT '最近 7 日处方开单支付成功次数',`prescription_pay_suc_amount_30d` DECIMAL(16, 2) COMMENT '最近 30 日处方开单支付成功金额',`prescription_pay_suc_count_30d` BIGINT COMMENT '最近 30 日处方开单支付成功次数'
) COMMENT '交易域医院患者性别年龄段粒度处方开单支付成功最近n日汇总表'PARTITIONED BY (`dt` STRING)STORED AS ORCLOCATION '/warehouse/medical/dws/dws_trade_hospital_gender_age_group_prescription_pay_suc_nd'TBLPROPERTIES ('orc.compress' = 'snappy');
5.交易域医生粒度问诊最近n日汇总表
建表语句
CREATE EXTERNAL TABLE IF NOT EXISTS dws_trade_doctor_consultation_nd
(`doctor_id` STRING COMMENT '医生ID',`doctor_name` STRING COMMENT '医生姓名',`consultation_count_7d` BIGINT COMMENT '最近 7 日接诊次数',`consultation_count_30d` BIGINT COMMENT '最近 30 日接诊次数'
) COMMENT '交易域医生粒度问诊最近n日汇总表'PARTITIONED BY (`dt` STRING)STORED AS ORCLOCATION '/warehouse/medical/dws/dws_trade_doctor_consultation_nd'TBLPROPERTIES ('orc.compress' = 'snappy');
6.首日装载脚本
vim ~/bin/medical_dws_1d_to_dws_nd.sh
#!/bin/bashAPP=medicalif [ -n $2 ]
then do_date=$2
elseecho "请传入日期参数!!!"exit
fidws_trade_hospital_gender_age_group_consultation_nd="
insert overwrite table ${APP}.dws_trade_hospital_gender_age_group_consultation_ndpartition (dt = '$do_date')
select hospital_id,hospital_name,gender_code,gender,age_group,sum(if(dt >= date_add('$do_date', -6), consultation_amount, 0)) consultation_amount_7d,sum(if(dt >= date_add('$do_date', -6), consultation_count, 0)) consultation_count_7d,sum(consultation_amount) consultation_amount_30d,sum(consultation_count) consultation_count_30d
from ${APP}.dws_trade_hospital_gender_age_group_consultation_1d
where dt >= date_add('$do_date', -29)
group by hospital_id,hospital_name,gender_code,gender,age_group;
"dws_trade_hospital_gender_age_group_consultation_pay_suc_nd="
insert overwrite table ${APP}.dws_trade_hospital_gender_age_group_consultation_pay_suc_ndpartition (dt = '$do_date')
select hospital_id,hospital_name,gender_code,gender,age_group,sum(if(dt >= date_add('$do_date', -6), consultation_pay_suc_amount, 0)) consultation_pay_suc_amount_7d,sum(if(dt >= date_add('$do_date', -6), consultation_pay_suc_count, 0)) consultation_pay_suc_count_7d,sum(consultation_pay_suc_amount) consultation_pay_suc_amount_30d,sum(consultation_pay_suc_count) consultation_pay_suc_count_30d
from ${APP}.dws_trade_hospital_gender_age_group_consultation_pay_suc_1d
where dt >= date_add('$do_date', -29)
group by hospital_id,hospital_name,gender_code,gender,age_group;
"dws_trade_hospital_gender_age_group_prescription_nd="
insert overwrite table ${APP}.dws_trade_hospital_gender_age_group_prescription_ndpartition (dt = '$do_date')
select hospital_id,hospital_name,gender_code,gender,age_group,sum(if(dt >= date_add('$do_date', -6), prescription_amount, 0)) prescription_amount_7d,sum(if(dt >= date_add('$do_date', -6), prescription_count, 0)) prescription_count_7d,sum(prescription_amount) prescription_amount_30d,sum(prescription_count) prescription_count_30d
from ${APP}.dws_trade_hospital_gender_age_group_prescription_1d
where dt >= date_add('$do_date', -29)
group by hospital_id,hospital_name,gender_code,gender,age_group;
"dws_trade_hospital_gender_age_group_prescription_pay_suc_nd="
insert overwrite table ${APP}.dws_trade_hospital_gender_age_group_prescription_pay_suc_ndpartition (dt = '$do_date')
select hospital_id,hospital_name,gender_code,gender,age_group,sum(if(dt >= date_add('$do_date', -6), prescription_pay_suc_amount, 0)) prescription_pay_suc_amount_7d,sum(if(dt >= date_add('$do_date', -6), prescription_pay_suc_count, 0)) prescription_pay_suc_count_7d,sum(prescription_pay_suc_amount) prescription_pay_suc_amount_30d,sum(prescription_pay_suc_count) prescription_pay_suc_count_30d
from ${APP}.dws_trade_hospital_gender_age_group_prescription_pay_suc_1d
where dt >= date_add('$do_date', -29)
group by hospital_id,hospital_name,gender_code,gender,age_group;
"dws_trade_doctor_consultation_nd="
insert overwrite table ${APP}.dws_trade_doctor_consultation_ndpartition (dt = '$do_date')
select doctor_id,doctor_name,sum(if(dt >= date_add('$do_date', -6), consultation_count, 0)) consultation_count_7d,sum(consultation_count) consultation_count_30d
from ${APP}.dws_trade_doctor_consultation_1d
where dt >= date_add('$do_date', -29)
group by doctor_id,doctor_name;
"case $1 indws_trade_hospital_gender_age_group_consultation_nd | dws_trade_hospital_gender_age_group_consultation_pay_suc_nd | dws_trade_hospital_gender_age_group_prescription_nd | dws_trade_hospital_gender_age_group_prescription_pay_suc_nd | dws_trade_doctor_consultation_nd)hive -e "${!1}";;"all")hive -e "$dws_trade_hospital_gender_age_group_consultation_nd$dws_trade_hospital_gender_age_group_consultation_pay_suc_nd$dws_trade_hospital_gender_age_group_prescription_nd$dws_trade_hospital_gender_age_group_prescription_pay_suc_nd$dws_trade_doctor_consultation_nd";;"*")echo "非法参数!!!";;
esac
添加权限
chmod +x ~/bin/medical_dws_1d_to_dws_nd.sh
数据装载
medical_dws_1d_to_dws_nd.sh all 2023-05-09
3.历史至今汇总表
1.交易域医生粒度问诊历史至今汇总表
建表语句
CREATE TABLE IF NOT EXISTS dws_trade_doctor_consultation_td(`doctor_id` STRING COMMENT '医生ID',`doctor_name` STRING COMMENT '医生姓名',`first_consultation_dt` STRING COMMENT '首次接诊日期'
) COMMENT '交易域医生粒度问诊历史至今汇总表'PARTITIONED BY (`dt` STRING)STORED AS ORCLOCATION '/warehouse/medical/dws/dws_trade_doctor_consultation_td'TBLPROPERTIES ('orc.compress' = 'snappy');
2.互动域医院用户粒度用户评价历史至今汇总表
建表语句
CREATE TABLE IF NOT EXISTS dws_interaction_hospital_user_review_td(`hospital_id` STRING COMMENT '医院ID',`hospital_name` STRING COMMENT '医院名称',`user_id` STRING COMMENT '用户ID',`username` STRING COMMENT '用户姓名',`first_review_dt` STRING COMMENT '首次评价日期'
) COMMENT '互动域医院用户粒度用户评价历史至今汇总表'PARTITIONED BY (`dt` STRING)STORED AS ORCLOCATION '/warehouse/medical/dws/dws_interaction_hospital_user_review_td'TBLPROPERTIES ('orc.compress' = 'snappy');
3.互动域医院粒度用户评价历史至今汇总表
建表语句
CREATE TABLE IF NOT EXISTS dws_interaction_hospital_review_td(`hospital_id` STRING COMMENT '医院ID',`hospital_name` STRING COMMENT '医院名称',`review_count` BIGINT COMMENT '评价次数',`good_review_count` BIGINT COMMENT '好评次数'
) COMMENT '互动域医院粒度用户评价历史至今汇总表'PARTITIONED BY (`dt` STRING)STORED AS ORCLOCATION '/warehouse/medical/dws/dws_interaction_hospital_review_td'TBLPROPERTIES ('orc.compress' = 'snappy');
4.首日数据装载
vim ~/bin/medical_dws_1d_to_dws_td_init.sh
#!/bin/bashAPP=medicalif [ -n $2 ]
then do_date=$2
elseecho "请传入日期参数!!!"exit
fidws_trade_doctor_consultation_td="
insert overwrite table ${APP}.dws_trade_doctor_consultation_tdpartition (dt = '$do_date')
select doctor_id,doctor_name,min(dt) first_consultation_dt
from ${APP}.dws_trade_doctor_consultation_1d
group by doctor_id,doctor_name;
"dws_interaction_hospital_user_review_td="
insert overwrite table ${APP}.dws_interaction_hospital_user_review_tdpartition (dt = '$do_date')
select hospital_id,name hospital_name,user_id,username,first_review_dt
from (select hospital_id,user_id,min(review.dt) first_review_dtfrom (select doctor_id,user_id,dtfrom ${APP}.dwd_interaction_review_inc) reviewleft join (select id,hospital_idfrom ${APP}.dim_doctor_fullwhere dt = '$do_date') docon review.doctor_id = doc.idgroup by hospital_id,user_id) avgleft join (select id,namefrom ${APP}.dim_hospital_fullwhere dt = '$do_date') hoson avg.hospital_id = hos.idleft join (select id,usernamefrom ${APP}.dim_user_fullwhere dt = '$do_date') \`user\`on avg.user_id = \`user\`.id;
"dws_interaction_hospital_review_td="
insert overwrite table ${APP}.dws_interaction_hospital_review_tdpartition (dt = '$do_date')
select hospital_id,name hospital_name,review_count,good_review_count
from (select hospital_id,count(*) review_count,sum(if(rating = 5, 1, 0)) good_review_countfrom (select doctor_id,ratingfrom ${APP}.dwd_interaction_review_inc) reviewleft join(select id,hospital_idfrom ${APP}.dim_doctor_fullwhere dt = '$do_date') docon review.doctor_id = doc.idgroup by hospital_id) avgleft join (select id,namefrom ${APP}.dim_hospital_fullwhere dt = '$do_date') hoson hospital_id = hos.id;
"case $1 indws_trade_doctor_consultation_td | dws_interaction_hospital_user_review_td | dws_interaction_hospital_review_td)hive -e "${!1}";;"all")hive -e "$dws_trade_doctor_consultation_td$dws_interaction_hospital_user_review_td$dws_interaction_hospital_review_td";;"*")echo "非法参数!!!";;
esac
添加权限
chmod +x ~/bin/medical_dws_1d_to_dws_td_init.sh
数据装载
medical_dws_1d_to_dws_td_init.sh all 2023-05-09
5.每日数据装载
vim ~/bin/medical_dws_1d_to_dws_td.sh
#!/bin/bashAPP=medicalif [ -n $2 ]
then do_date=$2
elseecho "请传入时间参数!!!"exit
fidws_trade_doctor_consultation_td="
insert overwrite table ${APP}.dws_trade_doctor_consultation_tdpartition (dt = '$do_date')
select nvl(old.doctor_id, new.doctor_id) doctor_id,nvl(old.doctor_name, new.doctor_name) doctor_name,if(old.doctor_id is null, '$do_date', first_consultation_dt) first_consultation_dt
from (select doctor_id,doctor_name,first_consultation_dtfrom ${APP}.dws_trade_doctor_consultation_tdwhere dt = date_add('$do_date', -1)) oldfull outer join(select doctor_id,doctor_namefrom ${APP}.dws_trade_doctor_consultation_1dwhere dt = '$do_date') newon old.doctor_id = new.doctor_idand old.doctor_name = new.doctor_name;
"dws_interaction_hospital_user_review_td="
insert overwrite table ${APP}.dws_interaction_hospital_user_review_tdpartition (dt = '$do_date')
select hospital_id,hospital_name,user_id,username,min(first_review_dt) first_review_dt
from (select hospital_id,hospital_name,user_id,username,first_review_dtfrom ${APP}.dws_interaction_hospital_user_review_tdwhere dt = date_add('$do_date', -1)unionselect hospital_id,name hospital_name,user_id,username,first_reveiw_dtfrom (select hospital_id,user_id,'$do_date' first_reveiw_dtfrom (select doctor_id,user_idfrom ${APP}.dwd_interaction_review_incwhere dt = '$do_date') reivewleft join (select id,hospital_idfrom ${APP}.dim_doctor_full) docon reivew.doctor_id = doc.idgroup by user_id,hospital_id) avgleft join (select id,namefrom ${APP}.dim_hospital_fullwhere dt = '$do_date') hoson avg.hospital_id = hos.idleft join (select id,usernamefrom ${APP}.dim_user_fullwhere dt = '$do_date') \`user\`on avg.user_id = \`user\`.id) \`all\`
group by hospital_id,hospital_name,user_id,username;
"dws_interaction_hospital_review_td="
insert overwrite table ${APP}.dws_interaction_hospital_review_tdpartition (dt = '$do_date')
select hospital_id,hospital_name,sum(review_count) review_count,sum(good_review_count) good_review_count
from (select hospital_id,hospital_name,review_count,good_review_countfrom ${APP}.dws_interaction_hospital_review_tdwhere dt = date_add('$do_date', -1)unionselect hospital_id,name hospital_name,review_count,good_review_countfrom (select hospital_id,count(*) review_count,sum(if(rating = 5, 1, 0)) good_review_countfrom (select doctor_id,ratingfrom ${APP}.dwd_interaction_review_incwhere dt = '$do_date') reviewleft join (select id,hospital_idfrom ${APP}.dim_doctor_fullwhere dt = '$do_date') docgroup by hospital_id) avgleft join (select id,namefrom ${APP}.dim_hospital_fullwhere dt = '$do_date') hoson hospital_id = hos.id) \`all\`
group by hospital_id,hospital_name;
"case $1 indws_trade_doctor_consultation_td | dws_interaction_hospital_user_review_td | dws_interaction_hospital_review_td)hive -e "${!1}";;"all")hive -e "$dws_trade_doctor_consultation_td$dws_interaction_hospital_user_review_td$dws_interaction_hospital_review_td";;"*")echo "非法参数!!!";;
esac
添加权限
chmod +x ~/bin/medical_dws_1d_to_dws_td.sh
总结
内容有点多,可能还要一次才能完成。
相关文章:
线上问诊:数仓开发(二)
系列文章目录 线上问诊:业务数据采集 线上问诊:数仓数据同步 线上问诊:数仓开发(一) 线上问诊:数仓开发(二) 文章目录 系列文章目录前言一、DWS1.最近1日汇总表1.交易域医院患者性别年龄段粒度问诊最近1日汇总表2.交易域医院患者…...
Ansible自动化运维工具(三)
目录 Ansible 的脚本 --- playbook 剧本 编辑2.vars模块实战实例 3.指定远程主机sudo切换用户 4.when模块实战实例 5.with_items迭代模块实战实例 6.Templates 模块实战实例 (1)先准备一个以 .j2 为后缀的 template 模板文件,设置引用…...
ChatGPT在创新和创业中的应用如何?
ChatGPT是一种基于大规模预训练的语言模型,它在创新和创业中有着广泛的应用。作为一种具备自然语言处理能力的模型,ChatGPT可以与用户进行对话,并提供相关的信息、建议和创意。以下是ChatGPT在创新和创业中的一些应用: 创意生成和…...
Log4j2 配置日志记录发送到 kafka 中
前言 log4j2 在 2.11.0 之后的版本,已经内置了 KafkaAppender 支持可以将打印的日志直接发送到 kafka 中,在这之前如果想要集中收集应用的日志,就需要自定义一个 Layout 来实现,相对来说还是比较麻烦的。 官网文档:L…...
Linux用户与组管理(03)(八)
提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 目录 前言 一、组管理 1、概述 2、用户信息查看 总结 前言 今天是学习用户与组管理的最后一节课,这节课主要是组管理的内容,希望能一起学习ÿ…...
Java自定义异常
Java标准库定义的常用异常包括: 当我们在代码中需要抛出异常时,尽量使用JDK已定义的异常类型。例如,参数检查不合法,应该抛出IllegalArgumentException: static void process1(int age) {if (age < 0) {throw new…...
vscode远程调试php
使用vscode远程调试php的方法 1.安装remote ssh插件 2.连接服务器 可以点击左下角的绿色按钮,或者ctrlshiftp打开命令框输入remote ssh应该也有。 3.在服务器端vscode安装php debug插件 4.安装xdebug xdebug是用来调试php的软件,原本和vscode没什么关…...
C语言:截断+整型提升练习
详情关于整型提升与截断见文章:《C语言:整型提升》 一、代码一 int main() { char a -1; signed char b -1; unsigned char c -1; printf("%d %d %d", a, b, c); return 0; } 求输出结果 解析如下代码: int mai…...
Kubernetes技术--k8s核心技术kubectl命令行工具
(1).概述 kubectl是Kubernetes集群的命令行工具,通过 kubectl 能够对集群本身进行管理,并能够在集群上进行容器化应用的安装部署。 (2).语法 Kubectl [command] [type] [name] [flags] 语法参数说明: command: 指定要对资源执行的操作,例如 create、get、describe 和 delet…...
Element浅尝辄止9:Popover 弹出框组件
Popover 的属性与 Tooltip 很类似,它们都是基于Vue-popper开发的,因此有重复属性 1.如何使用? /*trigger属性用于设置何时触发 Popover,支持四种触发方式: hover,click,focus 和 manual。 对于…...
程序开发:构建功能强大的应用的艺术
程序开发是在今天的数字化时代中扮演重要角色的一项技术。通过编写代码,开发人员能创造出无数不同的应用,从简单的计算器到复杂的社交平台。电子商务应用、在线教育平台、医疗记录系统等,都重视程序开发的重要性,通过这其中的交互…...
(七)k8s实战-高级调度
一、CronJob 定时任务 1、cron 表达式 # ┌───────────── 分钟 (0 - 59) # │ ┌───────────── 小时 (0 - 23) # │ │ ┌───────────── 月的某天 (1 - 31) # │ │ │ ┌───────────── 月份 (1 - 12) # │ │ │ │ ┌…...
HTTP/1.1协议中的八种请求
2023年8月29日,周二晚上 目录 概述八种请求GET请求POST请求PUT请求PATCH请求DELETE请求HEAD请求OPTIONS请求TRACE请求 概述八种请求 HTTP/1.1协议中定义了8种常用的请求方法,分别是:1. GET 用途:请求指定的页面信息,并返回实体主体。例子:获取一个网页、图片等静态…...
面试系列 - JVM内存模型和调优详解
目录 一、JVM内存模型 1. 程序计数器(Program Counter Register): 2.Java虚拟机栈(Java Virtual Machine Stacks): 3. 本地方法栈(Native Method Stack): 5. 方法区…...
JavaScript -【第一周】
文章来源于网上收集和自己原创,若侵害到您的权利,请您及时联系并删除~~~ JavaScript 介绍 变量、常量、数据类型、运算符等基础概念 能够实现数据类型的转换,结合四则运算体会如何编程。 体会现实世界中的事物与计算机的关系理解什么是数据并…...
高性能缓存 Caffeine 原理及实战
Caffeine 是基于Java 8 开发的、提供了近乎最佳命中率的高性能本地缓存组件,Spring5 开始不再支持 Guava Cache,改为使用 Caffeine。 1 算法原理 对于 Java 进程内缓存我们可以通过 HashMap 来实现。不过,Java 进程内存是有限的,…...
【算法】leetcode 105 从前序与中序遍历序列构造二叉树
题目 输入某二叉树的前序遍历和中序遍历的结果,请构建该二叉树并返回其根节点。 假设输入的前序遍历和中序遍历的结果中都不含重复的数字。 示例 1: Input: preorder [3,9,20,15,7], inorder [9,3,15,20,7] Output: [3,9,20,null,null,15,7]示例 2: Input: pr…...
11 | Spark计算数据文件中每行数值的平均值
需求:计算数据文件中的数值的平均值 背景: 你有一个数据文件,其中包含一系列数值,每行一个数值,数值之间用逗号分隔。你想使用Apache Spark分布式计算框架来读取数据文件中的数值并计算它们的平均值。功能要求: 通过Spark配置和上下文初始化Spark应用程序。从数据文件中…...
AI与游戏创新:深度学习的起跑枪声
《AI与游戏创新:深度学习的起跑枪声》 目录 引言AIGC定义与重要性AI在游戏中的应用AI推动游戏创新的可能途径AIGC的挑战与解决方案结论:AI是游戏行业的下一站 引言 AI(人工智能)正在全球范围内改变各个行业,游戏行…...
【GUI开发】用python爬YouTube博主信息,并开发成exe软件
文章目录 一、背景介绍二、代码讲解2.1 爬虫2.2 tkinter界面2.3 存日志 三、软件演示视频四、说明 一、背景介绍 你好,我是马哥python说,一名10年程序猿。 最近我用python开发了一个GUI桌面软件,目的是爬取相关YouTube博主的各种信息&#…...
7.6 函数的递归调用
直接调用: ### 1. 直接递归调用 直接递归调用是指一个函数直接调用自己。例如,计算阶乘的函数,可以使用递归方法: int factorial(int n) {if (n < 1) {return 1;}return n * factorial(n - 1); } 在这个例子中,f…...
本地开机启动jar
1:首先有个可运行的jar包 本地以ruiyi代码为例打包 2:编写bat命令---命名为.bat即可 echo off java -jar D:\everyDay\test\RuoYi\target\RuoYi.jar 3:设置为开机自启动启动 快捷键winr----输入shell:startup---打开启动文档夹 把bat文件复…...
解决uniapp手机真机调试时找不到手机问题
1、检查 USB 调试是否开启 2、检查是否有选择 文件 传输 选项 3、如果上述都做了还找不到,可以看看开发者选项中的【USB设置】,把模式改为 MIDI 模式...
HarmonyOS应用开发者-----高级认证试题及答案
HarmonyOS应用开发者高级认证试题及答案 试题会不定时刷新,本试题仅供大家学习参考 【判断题】 2/2 HarmonyOS应用可以兼容OpenHarmony生态 正确(True)【判断题】 2/2 所有使用@Component修饰的自定义组件都支持onPageShow,onBackPress和onPageHide生命周期函数。 正确(True…...
R语言随机波动模型SV:马尔可夫蒙特卡罗法MCMC、正则化广义矩估计和准最大似然估计上证指数收益时间序列...
全文链接:http://tecdat.cn/?p31162 最近我们被客户要求撰写关于SV模型的研究报告,包括一些图形和统计输出(点击文末“阅读原文”获取完整代码数据)。 相关视频 本文做SV模型,选取马尔可夫蒙特卡罗法(MCMC)、正则化广…...
详细教程:Stegsolve的下载,jdk的下载、安装以及环境的配置
最近在学习隐写术,下载stegsolve 以及使用stegsolve倒腾了很久,避免朋友们和我一样倒腾了很久,希望此文可以帮到刚在学习隐写的朋友们(win7下使用stegsolve) 文章目录 一、下载stegsolve链接二、jdk的下载三、jdk的安装四、配置环境变量五、检…...
Watermark 是怎么生成和传递的?
分析&回答 Watermark 介绍 Watermark 本质是时间戳,与业务数据一样无差别地传递下去,目的是衡量事件时间的进度(通知 Flink 触发事件时间相关的操作,例如窗口)。 Watermark 是一个时间戳, 它表示小于该时间戳的…...
深度学习论文分享(八)Learning Event-Driven Video Deblurring and Interpolation
深度学习论文分享(八)Learning Event-Driven Video Deblurring and Interpolation 前言Abstract1 Introduction2 Motivation2.1 Physical Model of Event-based Video Reconstruction2.2 Spatially Variant Triggering Threshold 3 Proposed Methods3.1 …...
UI设计开发原则
一、一致性原则 坚持以用户体验为中心设计原则,界面直观、简洁,操作方便快捷,用户接触软件后对界面上对应的功能一目了然、不需要太多培训就可以方便使用本应用系统。 1、字体 保持字体及颜色一致,避免一套主题出现多个字体&am…...
Mac 如何判断下载Mac with Intel Chip 还是 Mac with Apple Chip
如下图,当我们在 Mac系统 下载客户端时,有两种选择:Mac with Intel Chip 、 Mac with Apple Chip 如何判断要下载哪一种? 需要判断本机Mac是在Inter芯片还是Apple芯片上运行的。方法如下: 点击屏幕左上角Apple标志&a…...
建立网站建设/seo广州工作好吗
小型linux制作参考文档1,构建镜像文件(100M)mkdir workdd if/dev/zero of/work/linux_root.img bs1k count100000 1000000 records in1000000 records out102400000 bytes (102 MB) copied, 0.803413 s, 127 MB/s2,将文件挂载为设备losetup /dev/loop0 /…...
伊利集团网站建设实训/西安网站制作工作室
这篇文章主要介绍了MySQL的字符集操作命令总结,包括各种查看数据库、数据表等查询命令,需要的朋友可以参考下以下均在mysql 5.5命令行中运行通过:查看MySQL支持的字符集:代码如下:show charset;查看字符集:代码如下:status下面的更…...
wordpress ftp 权限/电子商务软文写作
我们知道私有IP地址是不能在公网上进行路由的,现在用户需求是位于总公司的某一个VLAN想要和分部的某一个vlan进行直接的通信。 那么此时我们就通过 site-to-site ***来解决这个问题 配置 IPsec site-to-site *** 的几个重要步骤,我们以后的实验过程就按照…...
廊坊集团网站建设/全网关键词云在哪里看
Git 虽然因其分布式管理方式,不完全依赖网络,良好的分支策略,容易部署等优点,已经成为最受欢迎的源代码管理方式。但是一分耕耘一分收获,如果想更好地掌握 git,需要付出大量的学习成本。即使在各种 GUI 的加…...
网站建设一般一年多少费用/裂变营销五种模式十六种方法
Nielson 和 Chuang 的《quantum computation and quantum information》是学习量子计算和量子信息论必不可少的工具书。 我在博一期间曾学习过此书的几个章节, 现在对全书进行内容梳理,主要是概括一些重要的结论。转载于:https://www.cnblogs.com/zhangs…...
asp.net 微网站开发教程/个人网站建站教程
1、禁用启动项 window -> preferences -> general -> startup and shutdown -> plug-ins activated on startup,把不需要用到的勾去掉 2、禁止检查自动更新 window -> preferences -> install/update -> automatic updates,勾去掉…...