-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add user-facing view to fxa_oauth.clients #4623
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d297d74
Add user-facing view to fxa_oauth.clients
akkomar 59321d6
Update sql/moz-fx-data-shared-prod/accounts_db/fxa_oauth_clients/view…
akkomar 166f60a
newline
akkomar b670d66
Merge branch 'main' into fxa_oauth_clients_view
akkomar 43fca15
Merge branch 'main' into fxa_oauth_clients_view
akkomar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My personal preference would be to convert all ID bytes columns to hex strings in the underlying ETLs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, I plan to do that when I'm back in a week.