Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust the date filter in Europeana to pull updates rather than created records #2817

Merged
merged 2 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion catalog/dags/providers/provider_api_scripts/europeana.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def _get_timestamp_query_param(self, date):
start_timestamp = start_timestamp.replace("+00:00", "Z")
end_timestamp = end_timestamp.replace("+00:00", "Z")

return f"timestamp_created:[{start_timestamp} TO {end_timestamp}]"
return f"timestamp_update:[{start_timestamp} TO {end_timestamp}]"

def get_next_query_params(self, prev_query_params) -> dict:
if not prev_query_params:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_derive_timestamp_pair(ingester):
# The timestamps below depend on the ``FROZEN_DATE`` constant
# defined above.
assert ingester.base_request_body["query"] == (
"timestamp_created:[2018-01-15T00:00:00Z TO 2018-01-16T00:00:00Z]"
"timestamp_update:[2018-01-15T00:00:00Z TO 2018-01-16T00:00:00Z]"
)


Expand Down