snowflakedb / snowflakedb/snowflake-connector-python

SNOW-1658882: Please provide the option to copy grants when overwriting table using write_pandas

Open
#2,049 4 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

feature status-triage_done
Dominant language
Python
Stars
730
Forks
574
Avg merge
5h 45m
Merged PRs (30d)
16

Description

What is the current behavior?

When overwrite=True and auto_create_table=True, the new table created by write_pandas is created with fresh grants.

What is the desired behavior?

I would like the option to copy the grants of the old table to the new table, similar to the optional COPY GRANTS parameter of CREATE OR REPLACE TABLE.

How would this improve snowflake-connector-python?

In some use-cases, it is preferred to have table-level grants, instead of db/schema-level future grants.

If the table needs to be overwritten with a new schema definition (e.g. for schema evolution), the option to maintain the permission profile of the table would be useful.

References and other background

I will follow-up with a PR.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.