sqoop数据校验

sqoop数据校验

#4 check data
oracle_cnt=$(sqoop eval \
-Dmapred.job.queue.name=${queue} \
--connect ${connect} \
--username ${username} \
--password ${password} \
-e "
select 'check_data '||count(1) as cnt from all_tables
"|grep "check_data"|awk '{print $3}')


hive_cnt=$(hive -S -e "
select concat('check_data ',count(1)) as cnt from test1;
"|grep "check_data"|awk '{print $2}')

 

posted @ 2018-11-27 14:03  chenzechao  阅读(325)  评论(0编辑  收藏  举报