AnalysisException:重复的内联视图列别名:内联视图“q2”中的“account_id”

问题描述 投票:0回答:1
select *

from (

     select * 
     from prod_ard119_master.ead_basel_exp_id_mdp as crmd_ead
     inner join prod_account_app.account_customer as crmd_acc
     on crmd_ead.account_id = crmd_acc.account_id)  
as q2

inner join

prod_ard119_master.lgd_basel_exp_id_mdp 

on prod_ard119_master.lgd_basel_exp_id_mdp.customer_id = q2.customer_id

这是错误:

AnalysisException:重复的内联视图列别名:'account_id' 在内联视图“q2”中

sql hadoop inner-join impala
1个回答
0
投票

我没有运行hadoop,但从它的外观来看,这似乎是由于列

account_id
同时出现在q2和
prod_ard119_master.lgd_basel_exp_id_mdp
中而引起的。所以你的外部
select *
并不真正知道该选择哪个account_id。

注意:使用

SELECT *
不是一个好的做法,您可以在
SELECT
中指定列以避免此类问题。

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.