Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ SELECT
*
FROM
`moz-fx-data-shared-prod.subscription_platform_backend_cirrus_derived.delete_events_v1`
UNION ALL
SELECT
*
FROM
`moz-fx-data-shared-prod.subscription_platform_backend_cirrus_derived.delete_events_v2`
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
friendly_name: Subscription Platform Backend Cirrus Delete Events
description: Deletion events for subscription platform backend cirrus, derived
from payments-api GKE logs containing pre-derived nimbus_user_id
owners:
- dalvarez@mozilla.com
labels:
incremental: true
schedule: daily
table_type: client_level
scheduling:
dag_name: bqetl_fxa_events
bigquery:
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

require_column_description: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
SELECT
MIN(`timestamp`) AS submission_timestamp,
jsonPayload.fields.nimbus_user_id AS nimbus_user_id,
FROM
`moz-fx-fxa-prod.gke_fxa_prod_log.stderr`
WHERE
(
DATE(_PARTITIONTIME)
BETWEEN DATE_SUB(@submission_date, INTERVAL 1 DAY)
AND DATE_ADD(@submission_date, INTERVAL 1 DAY)
)
AND DATE(`timestamp`) = @submission_date
AND jsonPayload.type = 'glean.user.delete'
AND jsonPayload.fields.nimbus_user_id IS NOT NULL
GROUP BY
jsonPayload.fields.nimbus_user_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
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

description: Earliest timestamp of the account deletion log entry for this nimbus_user_id on the given date
- name: nimbus_user_id
type: STRING
mode: NULLABLE
description: Pre-derived Nimbus user identifier logged by payments-api at account deletion time
Loading