Created
May 18, 2021 16:04
-
-
Save pentium10/a660d2c9a07e4d27bb9ae4b2b4299e47 to your computer and use it in GitHub Desktop.
Workflows_bigquery_stackoverflow_dml.sql
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
DELETE FROM `my-project.analytics_1234567890.*` | |
WHERE _TABLE_SUFFIX BETWEEN CONCAT('events_', format_date('%Y%m%d', date_sub(CURRENT_DATE, interval 7 day))) | |
AND CONCAT('events_', format_date('%Y%m%d', CURRENT_DATE)) | |
AND event_name IN ('event_name_that_we_delete') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment