O'Reilly logo

Apache Hive Essentials by Dayong Du

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

INNER JOIN

INNER JOIN or JOIN returns rows meeting the join conditions from both sides of joined tables. The JOIN keyword can also be omitted by comma-separated table names; this is called an implicit join. Here are examples of the HQL JOIN operation:

  1. First, prepare a table to join with and load data to it:
      > CREATE TABLE IF NOT EXISTS employee_hr (      > name string,      > employee_id int,      > sin_number string,      > start_date date      > )      > ROW FORMAT DELIMITED      > FIELDS TERMINATED BY '|';      No rows affected (1.732 seconds)            > LOAD DATA INPATH '/tmp/hivedemo/data/employee_hr.txt'      > OVERWRITE INTO TABLE employee_hr;      No rows affected (0.635 seconds)
  1. Perform an INNER JOIN between two tables with equal and unequal join conditions, along with complex expressions ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required