Skip to content

Instantly share code, notes, and snippets.

@jasonnerothin
Last active August 6, 2020 13:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonnerothin/dfc856e9b6d8ec941302c8ae00b445cb to your computer and use it in GitHub Desktop.
Save jasonnerothin/dfc856e9b6d8ec941302c8ae00b445cb to your computer and use it in GitHub Desktop.
DECLARE INT month_ago; DECLARE INT streams_cutover_date;
SET month_ago = 200; SET streams_cutover_date = 2000;
-- ~~~ historical ~~~ --
INGEST * FROM source_database
WHERE
t < month_ago ;
-- ~~~ incremental ~~~ --
INGEST * FROM source_database
WHERE
t >= month_ago AND
t < streams_cutover_date ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment