|
@@ -26,18 +26,17 @@ def check_origin_hive(args):
|
|
|
partitionDt = result[0]
|
|
|
partitionHh = result[1]
|
|
|
count = check_data(project, table, partitionDt, partitionHh)
|
|
|
- if count == 0:
|
|
|
- print(f'分区:dt={partitionDt}/hh={partitionHh},数据为空')
|
|
|
- else:
|
|
|
+ if count != 0:
|
|
|
exist_partition.append(f'分区:dt={partitionDt}/hh={partitionHh},数据:{count}')
|
|
|
if len(exist_partition) == 0:
|
|
|
+ print('1')
|
|
|
exit(1)
|
|
|
else:
|
|
|
bot = FeishuBot()
|
|
|
msg = (
|
|
|
f'推荐模型数据更新 \n --step1【校验hive数据源】【success】:\n beginStr:{beginStr},endStr:{endStr}\n,detail:{exist_partition}')
|
|
|
bot.send_message(msg)
|
|
|
- print("0")
|
|
|
+ print('0')
|
|
|
|
|
|
|
|
|
def check_data(project, table, partitionDt, partitionDtHh) -> int:
|