Adds script to backfill some of the CAP/CPA user events. #58790
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This script will backfill the Cap::UserEvent table with records related to any folks that need it.
This is motivated by users being in the flow prior to the merging of specific recording of user events in our own database.
I could have built a View for this, but it felt easier to just backfill the few records in this window than maintain a database view that might have some issues when cloned to RedShift/Trevor.
Links
Deployment strategy
We would merge this and run the script on the production console. It does a 'dry run' where it writes out the records it would write. Then, you can commit that by running the script again. It should be idempotent.. if there are any failures, they will be found by running the script again.
There is a finite amount of old records since this is purely backfilling up to the date of the first actual user event record.
PR Checklist: