Member since
04-10-2025
1
Post
0
Kudos Received
0
Solutions
04-10-2025
03:28 PM
Hi, new to Hive and SQL. So please be patient. I've got a dataset with 2 tables: 1. organisations - contains names of the organisations and an id 2. relationships - contains id of the organisations which organisation is it related to, ie a superior i've got a query to show the immediate relationship next to each other: SELECT sub.organisation_id, sub.organisation_name, sup.organisation_id, sup.organisation_name
FROM organisation sup
JOIN relationship
ON sup.organisation_id = relationship_id
JOIN organisation sub
ON organisation_id = relationship_orgid How do I query this using Hive (or Impala) to display all the organisations in the ancestry? E.g., baby -> mother -> grandmother -> great-grandmother -> great-great-grandmother -> etc.
... View more
Labels:
- Labels:
-
Apache Hive