- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Impala Joins without duplicate key columns
- Labels:
-
Apache Hive
-
Apache Impala
-
Cloudera Hue
Created on ‎10-12-2017 01:03 AM - edited ‎09-16-2022 05:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Created ‎10-12-2017 01:44 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Created ‎09-25-2019 02:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
any update on this? specifying columns from join when there is over 50 columns is error prune.
