Skip to content

Conversation

@chutten
Copy link
Contributor

@chutten chutten commented Mar 28, 2025

Description

Per bug 1955428 (well, per the design doc beforehand), this takes the specially-named object metrics glean.attribution.ext and glean.distribution.ext and slides them over into client_info next to the rest of client_info.attribution.* and client_info.distribution.* (see also mozilla/glean#3091, where the client_info sections are added to the SDK and mozilla-services/mozilla-pipeline-schemas#841 where the sections and their fields are added to the schema)

Related Tickets & Documents

Reviewer, please follow this checklist

…d distribution info in client_info with the base info
@chutten
Copy link
Contributor Author

chutten commented Mar 31, 2025

sqlglot.errors.ParseError: Expecting ). Line 9, Col: 53. pointing to the . between client_info and attribution in

    metrics.object.glean_attribution_ext AS client_info.attribution.ext,

sure reinforces Ben's comment from mozilla-services/mozilla-pipeline-schemas#841 that REPLACE and nested fields don't play nicely.

... @BenWu ... should I leave this rewriting piece to you or someone else who knows bigquery-etl better than me?

@BenWu
Copy link
Contributor

BenWu commented Mar 31, 2025

If you don't need this soon (in the next 1-2 weeks), I can see if I or someone else can take a look. It should be straightforward to do and similar to what's done for baseline pings:

if schema.bq_table == "baseline_v1":
replacements += [
"mozfun.norm.glean_baseline_client_info"
"(client_info, metrics) AS client_info"
]

but recreating structs does have some performance cost so this could be expensive to do for all events pings for example so it might be worth some testing. Although we already are doing this for some other structs so maybe it wouldn't have a large additional impact

@chutten
Copy link
Contributor Author

chutten commented Mar 31, 2025

I'm willing to wait. I'll file a bug specifically for the column replacement, mirrored to a DENG ticket, and post it here. Thank you, @BenWu !

@chutten
Copy link
Contributor Author

chutten commented Mar 31, 2025

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.

3 participants