创建表
CREATE TABLE if not exists ${database}.ads_dd_s(
register_date
string COMMENT ‘日期’,
order_number
string COMMENT ‘流水号’,
card_no
string COMMENT ‘信用卡号’,
rl_bank_acct_no
string COMMENT ‘借记卡’,
loan_init_prin
int COMMENT ‘金额’,
loan_reg_status
string COMMENT ‘状态’,
) COMMENT ‘分期表’
PARTITIONED BY (partition_date
date COMMENT ‘分区字段’)
tblproperties(‘transactional’ = ‘false’);
删除表
drop table if exists 表
添加数据并删除之前数据
insert overwrite table zfb_cash_loan_d partition(partition_date = ‘2022-09-14’) values(‘2022-09-14’,‘1294828311’,‘-----’)
添加数据
insert into table zfb_cash_loan_d partition(partition_date = ‘2022-09-14’) values(‘2022-09-14’,‘1294828311’,‘-----’)