Last active
May 28, 2022 04:18
-
-
Save kvnkho/5dc7cc549fa25290ee4a2d15e61126ba to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # Prefect 1.0 | |
| @task | |
| def get_date(day: str): | |
| if day == "today": | |
| return datetime.date.today() | |
| else: | |
| # assume a string came in | |
| return datetime.datetime.strptime(day, '%Y-%m-%d').date() | |
| with Flow("basic") as flow: | |
| today = Parameter("today", default="today") | |
| today_parsed = get_date(today) | |
| e = extract(today_parsed) | |
| t = transform(e) | |
| l = load(t) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment