feat(activity_stream): create new activity stream live view (#4850)

* feat(activity_stream): in order to update a prefect to using new service account to access live data we need to create a proper live view with access granted to a proper workgroup that the service account will be assigned to

cannot merge until new workgroup is properly setup

* feat: adding new workgroup to dataset

* feat(prefect): adding new workgroup as needed for access to newtab data

* Update sql/moz-fx-data-shared-prod/activity_stream/impression_stats_live/metadata.yaml

Co-authored-by: whd <whd@users.noreply.github.com>

* Update sql/moz-fx-data-shared-prod/firefox_desktop/dataset_metadata.yaml

Co-authored-by: whd <whd@users.noreply.github.com>

* Update sql/moz-fx-data-shared-prod/firefox_desktop/newtab_live/metadata.yaml

Co-authored-by: whd <whd@users.noreply.github.com>

* feat(prefect): updating newtab dataset permissions for prefect

* Use same access regime for pocket/prefect as mozsocial/prefect

---------

Co-authored-by: whd <whd@users.noreply.github.com>
Co-authored-by: Wesley Dawson <whd@mozilla.com>
This commit is contained in:
Braunk 2024-01-23 17:26:43 -06:00 коммит произвёл GitHub
Родитель 10d7002b95
Коммит 440ba12d77
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
5 изменённых файлов: 24 добавлений и 3 удалений

Просмотреть файл

@ -10,3 +10,4 @@ workgroup_access:
members:
- workgroup:mozilla-confidential
- workgroup:pocket/prefect
- workgroup:mozsocial/prefect

Просмотреть файл

@ -0,0 +1,8 @@
---
# yamllint disable rule:line-length
friendly_name: Live Pings for `activity_stream_live.impression_stats_v1`
description: |-
A live view of pings sent to the
`activity_stream_live.impression_stats_v1` table.
Clustering fields: `submission_timestamp`

Просмотреть файл

@ -0,0 +1,10 @@
CREATE OR REPLACE VIEW
`moz-fx-data-shared-prod.activity_stream.impression_stats_live`
AS
SELECT
* REPLACE (mozfun.norm.metadata(metadata) AS metadata)
FROM
-- We explicitly choose v1 for now, but will transition to a unioned view
-- over v1 and v2 as the new schema is rolled out; see
-- https://bugzilla.mozilla.org/show_bug.cgi?id=1761790
`moz-fx-data-shared-prod.activity_stream_live.impression_stats_v1`

Просмотреть файл

@ -10,3 +10,4 @@ workgroup_access:
members:
- workgroup:mozilla-confidential
- workgroup:pocket/prefect
- workgroup:mozsocial/prefect

Просмотреть файл

@ -8,6 +8,7 @@ description: |-
Clustering fields: `submission_timestamp`
workgroup_access:
- role: roles/bigquery.dataViewer
members:
- workgroup:pocket/prefect
- role: roles/bigquery.dataViewer
members:
- workgroup:pocket/prefect
- workgroup:mozsocial/prefect