#!/bin/bash

# # # # # # # # # # # # # # # # # # # # # #
# @author  :wangjf
# @revision:2019-11-28 20:26:59
# # # # # # # # # # # # # # # # # # # # # #

source ../../dmp_env.sh

database="dwh"
table="ods_user_info"

# 为避免有任务在查询上一分区数据，故sleep 一小时后再 drop last partition
sleep 600

java -cp ../../${JAR} mobvista.dmp.util.ClickHouseMain ${database} ${table}

if [[ $? -ne 0 ]]; then
    exit 255
fi