Skip to content

Commit

Permalink
Follow up patches on v2 field name changes (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinhyukchang authored Feb 27, 2020
1 parent 6661903 commit b835b8b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions databuilder/extractor/hive_table_last_updated_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,27 +57,27 @@ class HiveTableLastUpdatedExtractor(Extractor):
"""
PARTITION_TABLE_SQL_STATEMENT = """
SELECT
DBS.NAME as schema,
DBS.NAME as `schema`,
TBL_NAME as table_name,
MAX(PARTITIONS.CREATE_TIME) as last_updated_time
FROM TBLS
JOIN DBS ON TBLS.DB_ID = DBS.DB_ID
JOIN PARTITIONS ON TBLS.TBL_ID = PARTITIONS.TBL_ID
{where_clause_suffix}
GROUP BY schema, table_name
ORDER BY schema, table_name;
GROUP BY `schema`, table_name
ORDER BY `schema`, table_name;
"""

NON_PARTITIONED_TABLE_SQL_STATEMENT = """
SELECT
DBS.NAME as schema,
DBS.NAME as `schema`,
TBL_NAME as table_name,
SDS.LOCATION as location
FROM TBLS
JOIN DBS ON TBLS.DB_ID = DBS.DB_ID
JOIN SDS ON TBLS.SD_ID = SDS.SD_ID
{where_clause_suffix}
ORDER BY schema, table_name;
ORDER BY `schema`, table_name;
"""

# Additional where clause for non partitioned table SQL
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from setuptools import setup, find_packages


__version__ = '2.0.1'
__version__ = '2.0.2'


requirements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'requirements.txt')
Expand Down

0 comments on commit b835b8b

Please sign in to comment.