paul created HIVE-24136:
---------------------------

             Summary: create table table_name as 任务执行成功,表没有创建出来
                 Key: HIVE-24136
                 URL: https://issues.apache.org/jira/browse/HIVE-24136
             Project: Hive
          Issue Type: Bug
    Affects Versions: 3.1.2
            Reporter: paul


hive 版本 3.1.2,使用 CTAS 方式创建表,执行状态成功但是表没有创建出来。 通过查询日志,发现没有  
metastore.HiveMetaStore: 22556: create_table: 
Table(tableName:t_nagent_trade_water_day_temp1061  和  exec.Task: Moving data to 
directory  相关的日志。 

查找过mysql binlog,没有在元数据库执行创建表语句

 

 

 

 

create table t_nagent_trade_water_day_temp1061 as

select 
a.trade_water_id,mrch_no,FIRST_REPORT_SUC_TIME,trade_amt,trade_date,create_time,trans_type,a.agent_code,mrch_type,level_four,level_four_name,level_three,level_three_name,

level_two,level_two_name,level_one,level_one_name from 

(select 
t1.trade_water_id,t1.mrch_no,t1.trade_amt,t1.trade_date,t1.create_time,t1.trans_type,t1.agent_code,t2.level_four,t2.level_four_name,

t2.level_three,t2.level_three_name,t2.level_two,t2.level_two_name,t2.level_one,t2.level_one_name

from t_nagent_trade_water t1 left join agent_belong_temp1061 t2 on 
t1.agent_code=t2.level_four

where t2.level_four!='' and t1.trade_status='1'

union all

select 
t1.trade_water_id,t1.mrch_no,t1.trade_amt,t1.trade_date,t1.create_time,t1.trans_type,t1.agent_code,''
 level_four,'' level_four_name,

t2.level_three,t2.level_three_name,t2.level_two,t2.level_two_name,t2.level_one,t2.level_one_name

from t_nagent_trade_water t1 left join 

(select 
level_three,level_three_name,level_two,level_two_name,level_one,level_one_name 
from agent_belong_temp1061

group by 
level_three,level_three_name,level_two,level_two_name,level_one,level_one_name) 

t2 on t1.agent_code=t2.level_three\nwhere t2.level_three!='' and 
t1.trade_status='1'

union all

select 
t1.trade_water_id,t1.mrch_no,t1.trade_amt,t1.trade_date,t1.create_time,t1.trans_type,t1.agent_code,''
 level_four,'' level_four_name,

'' level_three,'' 
level_three_name,t2.level_two,t2.level_two_name,t2.level_one,t2.level_one_name\nfrom
 t_nagent_trade_water t1 left join 

(select level_two,level_two_name,level_one,level_one_name from 
agent_belong_temp1061\ngroup by 
level_two,level_two_name,level_one,level_one_name) 

t2 on t1.agent_code=t2.level_two\nwhere t2.level_two!='' and t1.trade_status='1'

union all

select 
t1.trade_water_id,t1.mrch_no,t1.trade_amt,t1.trade_date,t1.create_time,t1.trans_type,t1.agent_code,''
 level_four,'' level_four_name,

'' level_three,'' level_three_name,'' level_two,'' 
level_two_name,t2.level_one,t2.level_one_name

from t_nagent_trade_water t1 left join 

(select level_one,level_one_name from agent_belong_temp1061\ngroup by 
level_one,level_one_name) 

t2 on t1.agent_code=t2.level_one

where t2.level_one!='' and t1.trade_status='1'

) a left join t_nagent_merchant_incoming b on a.mrch_no=b.merc_no where 
platform_code='05' and 
to_date(create_time)=from_unixtime(unix_timestamp("20200829",'yyyyMMdd'),'yyyy-MM-dd')



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to