【问题标题】:Joining a external partition table(with partition) with another external table without partition in hive将外部分区表(带分区)与另一个没有分区的外部表在配置单元中连接
【发布时间】:2014-05-05 19:17:05
【问题描述】:

我在 year='2010' 和 month='10' 和 day='02' 分区了一个外部表。我有另一个外部表,在配置单元中没有任何分区。两个表中有一个共同的字段。我怎样才能加入这两个表?

表 1(partition_test1) 分区为 (year='2010',month='10',day='02')

表 2(partition_test2) 没有任何分区的外部表。

我有以下查询

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

我认为这个查询并不完全正确。请问有什么建议吗?

【问题讨论】:

    标签: hive hiveql


    【解决方案1】:
    'select col1,col2 from table1 INNER JOIN table2 ON table1.col1=table2.col'
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-04-14
      • 2023-03-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多