diff --git a/cumulus_library_data_metrics/__init__.py b/cumulus_library_data_metrics/__init__.py index 8cc7399..4aebfc8 100644 --- a/cumulus_library_data_metrics/__init__.py +++ b/cumulus_library_data_metrics/__init__.py @@ -1,3 +1,3 @@ """Data Metrics study for Cumulus Library""" -__version__ = "5.0.1" +__version__ = "5.1.0" diff --git a/cumulus_library_data_metrics/meta/dates.jinja b/cumulus_library_data_metrics/meta/dates.jinja index 9ef573f..de29906 100644 --- a/cumulus_library_data_metrics/meta/dates.jinja +++ b/cumulus_library_data_metrics/meta/dates.jinja @@ -43,7 +43,11 @@ unified AS ( SELECT MIN(min_date) AS min_date, - MAX(max_date) AS max_date + -- Cap max_date to NOW because (A) it's not entirely accurate to say this study goes to the + -- year 2990 just because someone makes a typo and (B) Pandas has issues with parsing dates + -- past 2262 by default (search "timestamp limitations" in pandas docs) and gets confused + -- when exporting this table. + LEAST(MAX(max_date), CURRENT_DATE) AS max_date FROM unified );