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

[ADAP-947] [Feature] Support copy grant for dynamic tables #808

Closed
2 tasks done
ZhiZinTan-KSO opened this issue Oct 16, 2023 · 8 comments
Closed
2 tasks done

[ADAP-947] [Feature] Support copy grant for dynamic tables #808

ZhiZinTan-KSO opened this issue Oct 16, 2023 · 8 comments
Labels
dynamic_tables enhancement New feature or request grants Issues related to dbt's grants functionality Stale

Comments

@ZhiZinTan-KSO
Copy link

ZhiZinTan-KSO commented Oct 16, 2023

Is this a new bug in dbt-snowflake?

  • I believe this is a new bug in dbt-snowflake
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

with copy grant set in dbt_project.yml, when running dbt build --select some_dynamic_table_model --full-refresh, the grants that was given manually have been removed.

Expected Behavior

with copy grant set in dbt_project.yml, the existing grants on the dynamic table should be remain as it is.

Steps To Reproduce

  1. create snowflake dynamic table model and run it
{{
    config(
        materialized='dynamic_table',
        snowflake_warehouse = target.warehouse,
        target_lag = '5 minutes',
    )
}}

select * from {{ref('some_dynamic_table_model')}}
  1. manually grant to snoflake dynamic table
    grant select on some_database.some_schema.some_dynamic_table_model to role some_role;
  2. set copy grant config
    # dbt_project.yml models: +copy_grants: true
  3. dbt build --select some_dynamic_table_model --full-refresh
  4. check snowflake dynamic table grants
    show grants on table some_database.some_schema.some_dynamic_table_model;

Relevant log output

No response

Environment

- OS:Ventura 13.6
- Python:3.11.5
- dbt-core:1.6.5
- dbt-snowflake:0.21.3

Additional Context

No response

@ZhiZinTan-KSO ZhiZinTan-KSO added bug Something isn't working triage labels Oct 16, 2023
@github-actions github-actions bot changed the title [Bug] Dynamic table copy grant is not working [ADAP-947] [Bug] Dynamic table copy grant is not working Oct 16, 2023
@dataders
Copy link
Contributor

@zztan-ipg thanks for opening the issue! My first thought was "oh shoot, we totally missed that!", until I did some digging.

I'm going to confirm directly with some Dynamic Table folks at Snowflake, but my understanding based on the docs is that the COPY_GRANTS parameter is not supported for a CREATE DYNAMIC TABLE statement, where it is supported for other table types (e.g. CREATE TABLE)

@ZhiZinTan-KSO
Copy link
Author

Hey @dataders just wondering if you got the reply from Snowflake dynamic table folks yet?

@dataders
Copy link
Contributor

dataders commented Nov 9, 2023

thanks for the bump @zztan-ipg! I reached out to @sortalongo and team and the response was

COPY GRANTS is on the release train, but its delayed and going through a behavior change process. Opt-in period should start mid Nov

my advice would be to reach out to your Snowflake reps and tell them you're interested!

@ZhiZinTan-KSO
Copy link
Author

Noted with thanks!

@dbeatty10 dbeatty10 added enhancement New feature or request and removed triage bug Something isn't working labels Nov 9, 2023
@dbeatty10 dbeatty10 changed the title [ADAP-947] [Bug] Dynamic table copy grant is not working [ADAP-947] [Feature] Support copy grant for dynamic tables Nov 9, 2023
@dbeatty10
Copy link
Contributor

Relabeling this as a feature request since dbt is not behaving incorrectly. We will need to confirm that it works once its available within Snowflake

@dbeatty10 dbeatty10 added the grants Issues related to dbt's grants functionality label Apr 18, 2024
Copy link
Contributor

github-actions bot commented Nov 7, 2024

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.

@github-actions github-actions bot added the Stale label Nov 7, 2024
Copy link
Contributor

Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 14, 2024
@dataders
Copy link
Contributor

thanks for the bump @zztan-ipg! I reached out to @sortalongo and team and the response was

COPY GRANTS is on the release train, but its delayed and going through a behavior change process. Opt-in period should start mid Nov

update that is looks as if COPY GRANTS is now at least publicly available, and maybe GA?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dynamic_tables enhancement New feature or request grants Issues related to dbt's grants functionality Stale
Projects
None yet
Development

No branches or pull requests

3 participants