- Add a new column 'editCountBucket' to a closed set of tables
- Those are a currenlty existing closed set of tables, tables created in the future should implement any bucketization themselves.
- No changes to the schemas are needed, just to the tables.
- Create a SQL script that
- Given a schema table, an editCount field and a time range
- Populates the editCountBucket field for that time range
- The value of editCountBucket should be:
editCount == 0 ---> "0 edits" 1 <= editCount < 5 ---> "1-4 edits" 5 <= editCount < 100 ---> "5-99 edits" 100 <= editCount < 1000 ---> "100-999 edits" 1000 <= editCount ---> "1000+ edits"
Note that the editCount field name may vary for each schema, for example: editCount vs recipientEditCount vs userEditCount.
- Set up the script for periodic execution
- It must ensure that the field editCountBucket is populated for all schema events before they reach 90 days of age.
- The script should be automatized for all tables in the closed set.
The list of tables + the editCount field name needs to be created still. It must be extracted from the EL audit spreadsheet, column N: