Skip to content
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

Feature Request: Authorized View Generator / Refresher script #5

Open
jaketf opened this issue Aug 28, 2019 · 0 comments
Open

Feature Request: Authorized View Generator / Refresher script #5

jaketf opened this issue Aug 28, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@jaketf
Copy link

jaketf commented Aug 28, 2019

Often customers have a source table and an authorized view which drops a few blacklisted fields.
Sometimes the schema of the underlying table changes and the view definition drops fields it shouldn't.

Let's create a script that will pull the schema from an existing table and drop a list of blacklisted fields (or sub-fields) and generate the SQL for a view.

The script should take the following inputs:

  • source table (fully qualified project.dataset.table)
  • destination view ( fully qualified project.dataset.view)
  • list of fields to drop

Considerations:

  • Handle dropping fields from within structs in a nested schema.
  • Implementing this in Golang would be nice so it can be a compiled CLI utility and for ease of usage from terraform modules.

Nice to Have:

  • Include automation to Create the view and reinstate it's authorization on the source dataset.

Ugly Python Prototype: gist

@afleisc afleisc added the enhancement New feature or request label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants