Coder Social home page Coder Social logo

Comments (8)

salimmoulouel avatar salimmoulouel commented on July 18, 2024

currently i've done it with a for i in range(1,1000000) not very convenient

from dbt-bigquery.

dbeatty10 avatar dbeatty10 commented on July 18, 2024

Thanks for reaching out @salimmoulouel salimmoulouel!

Can you share more about the scenarios in which this would be necessary?

I seem to recall a similar proposal a while back, but I can't find it at the moment. If I recall correctly, we ended up choosing not to pursue it as being out of scope for dbt-core.

from dbt-bigquery.

salimmoulouel avatar salimmoulouel commented on July 18, 2024

My requirement involves removing outdated grants from a BigQuery authorized view during its recreation. To accomplish this, I utilize a materialization process that iteratively updates a dataset multiple times. To ensure compliance with Google's constraints, particularly the limit on dataset update operations per dataset per 10 seconds, I aim to introduce a delay. This delay helps regulate the frequency of updates and prevents exceeding the specified quota.

I am also open to exploring alternative solutions for removing outdated grants from BigQuery authorized views, especially if they can seamlessly manage multiple projects. Any suggestions in this regard would be greatly appreciated.

from dbt-bigquery.

dbeatty10 avatar dbeatty10 commented on July 18, 2024

Thanks for sharing your particular use-case!

Did you already try configuring grants in dbt, by any chance? I haven't tried this feature with BigQuery authorized views, so I'm not sure how well they work together or not.

from dbt-bigquery.

salimmoulouel avatar salimmoulouel commented on July 18, 2024

i tried it, to grant access it's easy, but to update them it's a whole other thing.

from dbt-bigquery.

dbeatty10 avatar dbeatty10 commented on July 18, 2024

The grants feature is supposed to update the grants by issuing revoke statements when necessary [1] [2].

When you update your grants config in dbt to remove a user and you check your debug logs, are you finding that it isn't issuing a revoke statement?

from dbt-bigquery.

salimmoulouel avatar salimmoulouel commented on July 18, 2024

To clarify my issue further, I apologize for any lack of clarity. My objective is to provide authorized views with access to a specific dataset. In subsequent versions of the view, I aim to modify the dataset to which access is granted. To achieve this, I utilize the "grant_access_to" function rather than "grant." However, in the current implementation, when updating the list of datasets granted access, the previous access permissions are not revoked.
https://docs.getdbt.com/reference/resource-configs/bigquery-configs#authorized-views

from dbt-bigquery.

dbeatty10 avatar dbeatty10 commented on July 18, 2024

Thanks for the clarification @salimmoulouel 👍

We don't plan on adding a sleep() function into dbt-core, but we could definitely consider keeping grants in sync within BigQuery authorized views when using the grant_access_to config (originally added within dbt-labs/dbt-core#2517).

I'm going to update the issue title and transfer this to the dbt-bigquery repo for further consideration.

from dbt-bigquery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.