Reply
New Contributor
Posts: 4
Registered: ‎09-13-2017

Impala Joins without duplicate key columns

[ Edited ]

When I have two Tables A(id, name) and B(id, age) I want to join.

through:

SELECT * FROM A
INNER JOIN B ON A.id=B.id

and also through:

SELECT * FROM A
INNER JOIN B USING(id)

in both ways, I get a table with duplicate key columns "id" from both previous tables:

(id, name, id, age)

 

What I want is (id, name, age), so the key columns should merge.

 

EDIT: I know I could do it through "SELECT A.id, name, age..." instead of "SELECT * ...", but I have many columns, that I don't want to go this workaround.

Cloudera Employee
Posts: 278
Registered: ‎07-29-2015

Re: Impala Joins without duplicate key columns

Hi Creaping,

  It looks like you already discovered the workaround I would suggest. We don't support any way to do this automatically for now. I agree that it would be convenient for some use cases.

Announcements