Skip to content

Commit

Permalink
Adding START_DATE and END_DATE to constants.py
Browse files Browse the repository at this point in the history
  • Loading branch information
odette-elementl committed Aug 1, 2023
1 parent 46ed83e commit f6895af
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion dagster_university/assets/constants.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from datetime import date

TAXI_ZONES_FILE_PATH = "data/raw/taxi_zones.csv"
TAXI_TRIPS_TEMPLATE_FILE_PATH = "data/raw/taxi_trips_{}.parquet"

Expand All @@ -8,4 +10,7 @@

REQUEST_DESTINATION_TEMPLATE_FILE_PATH = "data/outputs/{}.png"

DATE_FORMAT = "%Y-%m-%d"
DATE_FORMAT = "%Y-%m-%d"

START_DATE = "2023-01-01"
END_DATE = "2023-04-01"
6 changes: 4 additions & 2 deletions dagster_university/partitions/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from dagster import MonthlyPartitionsDefinition, WeeklyPartitionsDefinition
from os import environ

from ..assets import constants

## Lesson 8
start_date = environ.get("START_DATE", "2023-01-01")
end_date = environ.get("END_DATE", "2023-04-01")
start_date = constants.START_DATE
end_date = constants.END_DATE

monthly_partition = MonthlyPartitionsDefinition(
start_date=start_date,
Expand Down

0 comments on commit f6895af

Please sign in to comment.