Skip to content

feat(etl): Update subscription deletion ETL scripts#9216

Merged
BenWu merged 1 commit intomozilla:mainfrom
david1alvarez:PAY-3438
Apr 16, 2026
Merged

feat(etl): Update subscription deletion ETL scripts#9216
BenWu merged 1 commit intomozilla:mainfrom
david1alvarez:PAY-3438

Conversation

@david1alvarez
Copy link
Copy Markdown
Contributor

Because:

  • Current glean deletion ETL query duplicates the nimbus_user_id derivation logic that lives in the fxa repository

This commit:

  • Updates the script to match the paired PR, while still supporting the existing approach

Closes #PAY-3438

Copy link
Copy Markdown
Contributor

@BenWu BenWu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some comments on column descriptions but othwerwise LGTM

time_partitioning:
type: day
field: submission_timestamp
require_partition_filter: false
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The expectation is that new tables have column descriptions in the schema.yaml and this should be set

Suggested change
require_partition_filter: false
require_partition_filter: false
require_column_descriptions: true

Creating tables via the cli will add this but can get missed when copy/pasting

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to add require_column_description: true

fields:
- name: submission_timestamp
type: TIMESTAMP
mode: NULLABLE
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A description is useful here because the meaning of submission_timestamp here doesn't match the meaning we're used to having everywhere else (logged event vs. telemetry ping). I know the delete_events_v1 table doesn't have this but this would be an improvement

Suggested change
mode: NULLABLE
mode: NULLABLE
description: ...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to add description: Earliest timestamp of the account deletion log entry for this nimbus_user_id on the given date and description: Pre-derived Nimbus user identifier logged by payments-api at account deletion time

Because:

* Current glean deletion ETL query duplicates the nimbus_user_id derivation logic that lives in the fxa repository

This commit:

* Updates the script to match the paired [PR](mozilla/fxa#20381), while still supporting the existing approach

Closes #PAY-3438
Copy link
Copy Markdown
Contributor

@BenWu BenWu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll merge this when CI finishes

@BenWu BenWu added this pull request to the merge queue Apr 16, 2026
Merged via the queue into mozilla:main with commit dad1c4f Apr 16, 2026
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants