Saving all output to "!!{outputDirectory}!!/leftsemijoin.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/leftsemijoin.q >>> drop table sales; No rows affected >>> drop table things; No rows affected >>> >>> set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat; No rows affected >>> >>> CREATE TABLE sales (name STRING, id INT) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'; No rows affected >>> >>> CREATE TABLE things (id INT, name STRING) partitioned by (ds string) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'; No rows affected >>> >>> load data local inpath '../data/files/sales.txt' INTO TABLE sales; No rows affected >>> load data local inpath '../data/files/things.txt' INTO TABLE things partition(ds='2011-10-23'); No rows affected >>> load data local inpath '../data/files/things2.txt' INTO TABLE things partition(ds='2011-10-24'); No rows affected >>> >>> SELECT name,id FROM sales ORDER BY name ASC, id ASC; 'name','id' 'Hank','2' 'Joe','2' 2 rows selected >>> >>> SELECT id,name FROM things ORDER BY id ASC, name ASC; 'id','name' '2','Tie' '2','Tie' 2 rows selected >>> >>> SELECT name,id FROM sales LEFT SEMI JOIN things ON (sales.id = things.id) ORDER BY name ASC, id ASC; 'name','id' 'Hank','2' 'Joe','2' 2 rows selected >>> >>> drop table sales; No rows affected >>> drop table things; No rows affected >>> !record