Joining a external partition table(with partition) with another external table without partition in hive

StackOverflow https://stackoverflow.com/questions/23480054

  •  16-07-2023
  •  | 
  •  

Question

I have one external table partitioned on year='2010' and month='10' and day='02'. An i have another external table without any partitions in hive. There is a common field in both the tables. How can i join both these tables?

Table 1(partition_test1) is partitioned by (year='2010',month='10',day='02')

And

Table 2(partition_test2) external table without any partitions.

I have the below query

'select * from table1
LEFT SEMI JOIN table2 ON table1.column1 = table2.column_1
WHERE year='2010' AND month='10' AND day='02';'

I don't think the query is completely right. Any suggestions please?

Was it helpful?

Solution

'select col1,col2 from table1 INNER JOIN table2 ON table1.col1=table2.col'
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top