前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家。点击跳转到教程。

1.报错:

Error while compiling statement: FAILED: SemanticException [Error 10007]: Ambiguous column reference creationtime in bcpt

2. sql如下:

insert overwrite table z_w_clean.di_tets_e_type
  SELECT cont_pr_code,
         plurt_code,
         elec_e_code,
         cont_price_name,
         pre,
         creadate,
         ste,
         creationtime,
         ornizeid,
         cont_free,
         is_frlevy,
         bace_limit,
         creationtime,
         creorid,
         null,
         liicatiotime,
         lasmoerid,
         null
    FROM (SELECT contce_code,
                 plusort_coe,
                 eleype_code,
                 contrice_name,
                 pice,
                 cte_date,
                 sate,
                 fr_type,
                 orgzeid,
                 con_free,
                 iee_levy,
                 ballimit,
                 From_unixtime(Unix_timestamp(creationtime)) AS creationtime,
                 crearid,
                 null,
                 From_unixtime(Unix_timestamp(lastmontime)) AS lastationtime,
                 lastmoid,
                 null,
                 Row_number() OVER(partition BY contece_code ORDER BY ontime DESC) AS num
            FROM s_wter.buients_prce_pe) bbb
   WHERE bbb.num = 1;

3.报错原因:有重复定义的列: creationtime , 改名解决 。

 

 

Logo

一站式虚拟内容创作平台,激发创意,赋能创作,进入R空间,遇见同道,让优质作品闪耀发光。​

更多推荐