Page MenuHomePhabricator

[DE 1.1.9] Include edit count in experiment_assignment_v1
Closed, ResolvedPublic2 Estimated Story Points

Description

Once experiment_exposure events start including performer_edit_count contextual attribute, we need to alter wmf_experiment.experiment_assignment_v1 table to include that information so it can be used in GrowthBook.

CREATE TABLE query: https://gitlab.wikimedia.org/repos/product-analytics/data-pipelines/-/blob/main/growthbook/create_experiment_assignment_table_iceberg.hql?ref_type=heads
INSERT INTO query: https://gitlab.wikimedia.org/repos/product-analytics/data-pipelines/-/blob/main/growthbook/experiment_assignment_query_iceberg.hql?ref_type=heads
DAG: https://gitlab.wikimedia.org/repos/data-engineering/airflow-dags/-/blob/main/analytics_product/dags/growthbook/growthbook_hourly_dag.py?ref_type=heads

Acceptance criteria

  • experiment_assignment_v1 table includes and populates column local_edit_count (using values from performer.edit_count)

Event Timeline

mpopov triaged this task as Medium priority.Jul 28 2026, 2:56 PM
mpopov set the point value for this task to 2.
JVanderhoop-WMF raised the priority of this task from Medium to High.Jul 28 2026, 3:39 PM
$ sudo -u analytics-product kerberos-run-command analytics-product spark3-sql \
 -e "ALTER TABLE wmf_experiments.experiment_assignment_v1 ADD COLUMN user_edit_count bigint COMMENT 'Total number of local wiki edits'"

$ spark3-sql -e "DESCRIBE wmf_experiments.experiment_assignment_v1"
col_name	data_type	comment
subject_id	string	Experiment subject identifier
timestamp	timestamp	Event time (year-month-day hour:00:00.000)
experiment_id	string	Experiment enrolled (experiment identifier)
variation_id	string	Experiment assigned variation
user_auth_status	string	User authentication status (Bot, Temporary user, Permanent user, Logged-out user, or Unknown)
user_platform	string	Desktop or Mobile
mediawiki_skin	string	MediaWiki skin
wiki_name	string	English name of wiki (e.g. Bangla Wikipedia)
wiki_id	string	Database code of wiki (e.g. bnwiki)
language	string	Language of wiki (e.g. Bangla)
project_family	string	Wiki group (e.g. wikipedia)
user_edit_count	bigint	Total number of local wiki edits
		
# Partitioning		
Part 0	days(timestamp)