Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AmendsenProject
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shaik Janipasha
AmendsenProject
Commits
c3e713e7
Unverified
Commit
c3e713e7
authored
Sep 07, 2020
by
Zack Wu
Committed by
GitHub
Sep 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: edge case in Snowflake information_schema.last_altered value (#360)
Signed-off-by:
Tao Feng
<
fengtao04@gmail.com
>
parent
4113cfd3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
snowflake_table_last_updated_extractor.py
...ilder/extractor/snowflake_table_last_updated_extractor.py
+2
-1
No files found.
databuilder/extractor/snowflake_table_last_updated_extractor.py
View file @
c3e713e7
...
...
@@ -21,6 +21,7 @@ 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
=
"""
...
...
@@ -47,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'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment