Skip to content

Commit

Permalink
Have where clause instead of nvl for null last_altered
Browse files Browse the repository at this point in the history
Signed-off-by: Zack Wu <[email protected]>
  • Loading branch information
instazackwu committed Sep 4, 2020
1 parent 3eedcc0 commit 9354d63
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class SnowflakeTableLastUpdatedExtractor(Extractor):
lower({cluster_source}) AS cluster,
lower(t.table_schema) AS schema,
lower(t.table_name) AS table_name,
NVL(DATE_PART(EPOCH, t.last_altered), 0) AS last_updated_time
DATE_PART(EPOCH, t.last_altered) AS last_updated_time
FROM
{database}.INFORMATION_SCHEMA.TABLES t
{where_clause_suffix};
Expand All @@ -48,7 +48,7 @@ class SnowflakeTableLastUpdatedExtractor(Extractor):
DEFAULT_CLUSTER_NAME = 'master'

DEFAULT_CONFIG = ConfigFactory.from_dict(
{WHERE_CLAUSE_SUFFIX_KEY: ' ',
{WHERE_CLAUSE_SUFFIX_KEY: ' WHERE t.last_altered IS NOT NULL ',
CLUSTER_KEY: DEFAULT_CLUSTER_NAME,
USE_CATALOG_AS_CLUSTER_NAME: True,
DATABASE_KEY: 'snowflake',
Expand Down

0 comments on commit 9354d63

Please sign in to comment.