Skip to content

Commit

Permalink
Correct file
Browse files Browse the repository at this point in the history
Signed-off-by: Zack Wu <zack.wu@instacart.com>
  • Loading branch information
instazackwu committed Sep 4, 2020
1 parent 3dcd27d commit 3eedcc0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 176 deletions.
Expand Up @@ -21,14 +21,15 @@ class SnowflakeTableLastUpdatedExtractor(Extractor):
snowflake-connector-python
snowflake-sqlalchemy
"""
# https://docs.snowflake.com/en/sql-reference/info-schema/views.html#columns
# 'last_altered' column in 'TABLES` metadata view under 'INFORMATION_SCHEMA' contains last time when the table was
# updated (both DML and DDL update). Below query fetches that column for each table.
SQL_STATEMENT = """
SELECT
lower({cluster_source}) AS cluster,
lower(t.table_schema) AS schema,
lower(t.table_name) AS table_name,
DATE_PART(EPOCH, t.last_altered) AS last_updated_time
NVL(DATE_PART(EPOCH, t.last_altered), 0) AS last_updated_time
FROM
{database}.INFORMATION_SCHEMA.TABLES t
{where_clause_suffix};
Expand Down
175 changes: 0 additions & 175 deletions example/scripts/sample_mysql_loader.py

This file was deleted.

0 comments on commit 3eedcc0

Please sign in to comment.