Update filter on hive_table_last_updated_extractor to use PARTITION_KEYS to filter out partitioned table
@@ -81,7 +81,9 @@ class HiveTableLastUpdatedExtractor(Extractor):
"""
# Additional where clause for non partitioned table SQL
- ADDTIONAL_WHERE_CLAUSE = ' NOT EXISTS (SELECT * FROM PARTITIONS WHERE PARTITIONS.TBL_ID = TBLS.TBL_ID)'
+ ADDTIONAL_WHERE_CLAUSE = """ NOT EXISTS (SELECT * FROM PARTITIONS WHERE PARTITIONS.TBL_ID = TBLS.TBL_ID)
+ AND NOT EXISTS (SELECT * FROM PARTITION_KEYS WHERE PARTITION_KEYS.TBL_ID = TBLS.TBL_ID)
+ """
DATABASE = 'hive'
