为什么会出现“无法在表达式规范中识别')''mud''on'附近的输入”错误?

时间:2019-08-26 12:53:54

标签: hive hiveql

为什么会出现错误:

org.apache.hadoop.hive.ql.parse.ParseException: line 27:0 cannot recognize input near ')' 'mud' 'on' in expression specification

在Hive中的SQL下面:

SELECT DISTINCT tf.trl, 
                mud.site_name, 
                eapid.expe_business_partner_id AS eapid 
FROM            sync.cons_bkg_trans_fact_all tf 
LEFT JOIN       sync.business_partner_dim AS eapid 
ON              eapid.business_partner_key = tf.business_partner_key 
LEFT JOIN 
                ( 
                          SELECT    mu.mgmt_unit_key, 
                                    mu.mgmt_unit_code, 
                                    COALESCE (site.site_name, map_.site_name, 'Not Applicable') AS site_name,
                                    COALESCE (site.rept_site_name, 'Not Applicable')            AS rpt_site_name,
                                    mu.mgmt_unit_name 
                          FROM      sync.mgmt_unit_dim mu 
                          LEFT JOIN sync.dm_omniture_site_oumu_map map_ 
                          ON        mu.mgmt_unit_key = map_.mgmt_unit_key 
                          LEFT JOIN dm.dm_omniture_site site 
                          ON        site.site_name = map_.site_name 
                          GROUP BY  mu.mgmt_unit_key, 
                                    mu.mgmt_unit_code, 
                                    COALESCE(site.site_name, map_.site_name, 'Not Applicable'), 
                                    COALESCE(site.rept_site_name, 'Not Applicable'), 
                                    mu.mgmt_unit_name, ) mud 
ON              tf.mgmt_unit_key = mud.mgmt_unit_key 
LEFT JOIN       sync.product_ln_dim pl 
ON              pl.product_ln_key = tf.product_ln_key 
WHERE           tf.gmt_trans_date_key >= date '2019-06-29' 
AND             upper(pl.pkg_ind) = 'STANDALONE'

0 个答案:

没有答案