Skip to content

Commit

Permalink
Add user-facing view to fxa_oauth.clients (#4623)
Browse files Browse the repository at this point in the history
  • Loading branch information
akkomar authored and irrationalagent committed Dec 11, 2023
1 parent 691e7f3 commit f4fb082
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
12 changes: 12 additions & 0 deletions sql/moz-fx-data-shared-prod/accounts_db/dataset_metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
friendly_name: Firefox Accounts Databases production
description: |-
Views for accessing data extracted from Mozilla Accounts backend services databases.
Contains views to selected tables and columns from `accounts_db_external` dataset that are useful for analysis.
dataset_base_acl: view
user_facing: true
labels: {}
workgroup_access:
- role: roles/bigquery.dataViewer
members:
- workgroup:mozilla-confidential
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
friendly_name: Clients table from production fxa_oauth database
description: |-
An authorized view on top of the `accounts_db_external.fxa_oauth_clients_v1` table.
Contains mappings of oauth client ids to their names.
`id` column is converted from bytes to a hex string.
See https://mozilla.github.io/ecosystem-platform/reference/database-structure#database-fxa
labels:
authorized: true
workgroup_access:
- role: roles/bigquery.dataViewer
members:
- workgroup:mozilla-confidential
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CREATE OR REPLACE VIEW
`moz-fx-data-shared-prod.accounts_db.fxa_oauth_clients`
AS
SELECT
TO_HEX(id) AS id,
name,
createdAt,
FROM
`moz-fx-data-shared-prod.accounts_db_external.fxa_oauth_clients_v1`

0 comments on commit f4fb082

Please sign in to comment.