This repository has been archived by the owner on Nov 2, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement daily cleanup and schema check.
- Loading branch information
Showing
8 changed files
with
170 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"""Airflow DAGs.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
DELETE `{project}.{dataset}.{dest}` WHERE app_name='Zerda' | ||
AND submission_date >= DATE '{start_date}' | ||
AND submission_date < DATE_ADD(DATE '{start_date}', INTERVAL '1' DAY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
DELETE | ||
`{project}.{dataset}.{dest}` | ||
WHERE | ||
normalized_app_name='Zerda' AND | ||
DATE(submission_timestamp) >= DATE '{start_date}' AND | ||
DATE(submission_timestamp) < DATE_ADD(DATE '{start_date}', INTERVAL '1' DAY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
DELETE `{project}.{dataset}.{dest}` WHERE source='bukalapak' | ||
AND DATE(utc_datetime) >= DATE '{start_date}' | ||
AND DATE(utc_datetime) < DATE_ADD(DATE '{start_date}', INTERVAL '1' DAY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.