set hive.exec.dynamic.partition.mode=nonstrict;
insert overwrite table check_t partition (ds) select sno,
uid, is_risk_apply, is_pass_rule, is_obtain_qutoa, quota,
update_time,
ds
from check_view;
![img](https://img-blog.csdnimg.cn/img_convert/88b3dd1f1f412413b6eda409cee58720.png)
– 创 建 借 据 表
create table debt(
duebill_id string comment ‘借据号’,
uid string, prod_type string,
putout_date string,
putout_amt decimal(30, 6),
balance decimal(30, 6),
is_buliang int,
overduedays int
)partitioned by (ds string comment ‘日期分区’);
–资料提供了一个34899条借据数据的文件
–下面补充如何将文件的数据导入到分区表中。需要一个中间普通表过度。
drop table if exists webank_db.debt_temp;
create table webank_db.debt_temp(
duebill_id string comment ‘借据号’, uid string,
prod_type string,
putout_date string, putout_amt decimal(30, 6),
balance decimal(30,6),
is_buliang int, overduedays i