-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add user-facing view to fxa_oauth.clients (#4623)
- Loading branch information
1 parent
691e7f3
commit f4fb082
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
sql/moz-fx-data-shared-prod/accounts_db/dataset_metadata.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
15 changes: 15 additions & 0 deletions
15
sql/moz-fx-data-shared-prod/accounts_db/fxa_oauth_clients/metadata.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
9 changes: 9 additions & 0 deletions
9
sql/moz-fx-data-shared-prod/accounts_db/fxa_oauth_clients/view.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |