数据探查逻辑 Posted on 2026-04-26 In hive 123select count(distinct seller_bu_id) as ct1, count(distinct seller_bu_id, management_city_id) as ct2from mart_caterb2b.dim_seller_management_city_info 如果 ct1 = ct2,说明seller_bu_id:management_city_id是n:1的关系,n是1还是多,需要继续探查 如果 ct1 < ct2, 说明seller_bu_id:management_city_id是1:n的关系,n是多 如果 ct1 > ct2, 说明management_city_id中有null值,比例关系需要去掉这些null值重新计算。