Commit 012927a5 by hejiangming

no message

parent 84e3915a
......@@ -26,11 +26,15 @@ if __name__ == '__main__':
print(f"执行参数为{sys.argv}")
# ============================================================
# 数据有效范围守卫:品类调研仅 us + month + 从 2025-07 起(到最新月)。
# 数据有效范围守卫:品类调研仅 us + month + 从 2024-07 起(到最新月)。
# 24-07~25-06 这 12 个月原是为算 25-07 起的同比补的基准月(只算 Hive 不导出),现放开导出,
# 单纯供页面趋势图回看两年;页面主体(列表/详情)仍只展示 25-07 起,这段不对外显示。
# 同比环比表不跟着放开,理由见 dwt_bs_top100_change_rate.py 的同名守卫。
# 旧:只导 25-07 起 —— and tuple(map(int, str(date_info).split('-'))) >= (2025, 7)
# ============================================================
if not (site_name == 'us' and date_type == 'month'
and tuple(map(int, str(date_info).split('-'))) >= (2025, 7)):
print(f"[SKIP] 参数不在有效范围(仅 us/month/date_info>=2025-07):site={site_name} type={date_type} date={date_info},跳过导出")
and tuple(map(int, str(date_info).split('-'))) >= (2024, 7)):
print(f"[SKIP] 参数不在有效范围(仅 us/month/date_info>=2024-07):site={site_name} type={date_type} date={date_info},跳过导出")
sys.exit(0)
# 品类调研只有月粒度
......
......@@ -27,6 +27,9 @@ if __name__ == '__main__':
# ============================================================
# 数据有效范围守卫:品类调研仅 us + month + 从 2025-07 起(到最新月)。
# 【不跟主表一起放开到 24-07】主表已放开到 24-07 供趋势图回看,但同比环比不能跟:
# 算 24-07 的同比要 23-07 的主表分区,而主表最早只补到 24-07,对比期缺失会全落 1000 占位
# 这里保持 25-07 当护栏,24-07~25-06 也不需要同比环比(页面不显示这段)。
# ============================================================
if not (site_name == 'us' and date_type == 'month'
and tuple(map(int, str(date_info).split('-'))) >= (2025, 7)):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment