-
Notifications
You must be signed in to change notification settings - Fork 216
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
Update the 'updated_on' column during popularity refresh #4460
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to set the updated_on
in the batched_update
? That would make it easier to update this field whenever the batched_update
is run
Yes, this PR came up in conversation on #4429 (comment) where I noted that batched updates don't automatically set this either. My intention here is to fix it in the established DAGs while we think about a more permanent solution (likely a trigger). I'll add a change for the batched_update as well though! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works perfectly! Nice that Airflow has a pattern verification functionality
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Fixes
Description
When records are updated as part of a popularity refresh, the
updated_on
column is not updated. This PR changes that.It also updates the batched_update DAG to set the default
update_query
to include the updated_on update.Testing Instructions
Run a popularity refresh locally, ensure that it passes and that the
updated_on
column is updated.Trigger a batched_update and verify that the default
update_query
isSET updated_on = NOW(), ...
. Verify that you can run a batched_update with some additional query. Verify that if you try again but remove that part from theupdate_query
, you get a validation error in the UI.Checklist
Update index.md
).main
) or a parent feature branch.just catalog/generate-docs
for catalogPRs) or the media properties generator (
just catalog/generate-docs media-props
for the catalog or
just api/generate-docs
for the API) where applicable.Developer Certificate of Origin
Developer Certificate of Origin