Page MenuHomePhabricator

Determine which users will need to be migrated and how many of them are active
Closed, ResolvedPublic

Description

Motivation

Our choice of username format for temporary editors is to begin with an asterisk *. For that we will have to migrate existing usernames that begin with an asterisk to a different format. We want to inform these usernames that their usernames will need to change.

Spec
  • Come up with the list of users whose accounts begin with an asterisk (*) across all our projects
  • Determine how active the users are - it would be helpful if we can highlight users that have been active in the last 2 years

Event Timeline

Niharika created this task.
jwang raised the priority of this task from Medium to High.Mar 20 2023, 9:25 PM
Summary

Query

query_users <- "
SELECT wiki_db, user_id, user_name
FROM wmf_raw.mediawiki_user
WHERE snapshot='2023-02'
AND user_name  regexp '^[*]'
"
query_editors <- "
 SELECT wiki_db,
        event_user_text AS user_name,
        event_user_id AS user_id,
        count(revision_id) AS edits
    FROM wmf.mediawiki_history 
    WHERE
        snapshot='2023-02' AND
        event_entity = 'revision' AND
        event_type = 'create' AND
        --logged-in users
        event_user_is_anonymous = false 
        AND  event_user_text regexp '^[*]'
        AND substr(event_timestamp,1,10) BETWEEN '2021-03-01' AND '2023-02-28' 
GROUP BY wiki_db, event_user_text, event_user_id 

"
mpopov subscribed.

Thank you, Jennifer!