Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Impala Joins without duplicate key columns

avatar
Explorer

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.

2 REPLIES 2

avatar

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.

avatar
New Contributor

any update on this? specifying columns from join when there is over 50 columns is error prune.