step_1 — 创建临时表,模拟数据质量监控情况
create table if not exists dataintel_tmp.qzd_20211026_sjzl_v1 as
select 0 as a
,null as b
,null as c
,null as d
,null as e
,0 as f
,0 as g
,0 as h
,0 as i
,3 as j
,6 as k
,7 as l
,12 as m
step_2 (done)
— 暂未找到 hive中统计字段数的方法
— 假定每张表字段穷举计算
针对每张表跳板机中空跑的情况 (done)
!/bin/bash
day=date -d"-1 days" +"%Y%m%d"
if [ $# -eq 1 ];then
day=$1
fi
count=0
while
[ $count -eq 0 ]
do
sh xxxx.sh KaTeX parse error: Undefined control sequence: \ at position 84: …utformat=csv2 \̲ ̲ …{day}"`
echo $count
done
step_3 针对结果异常占比情况返回特定的异常值(done)
!/bin/bash
COMMON_PATH=/data/hechenxi/test_hive
source ${COMMON_PATH}/common.sh
v_job_stat=0
count=/usr/local/share/hive/bin/beeline --silent=true --outputformat=csv2 \ --showHeader=false --showWarnings=false \ -u 'jdbc:hive2://bj1240:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=com-hive' \ -n dataintel -p c2248Br9ERs5