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

[BUG]: Schema/database grants not applied to all targets when tables with same source schemas are mapped to different target schemas #1580

Closed
1 task done
JCZuurmond opened this issue Apr 29, 2024 · 0 comments · Fixed by #1581
Assignees
Labels
bug Something isn't working

Comments

@JCZuurmond
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

CatalogSchema._get_database_source_target_mapping assumes a unique mapping from a source schema to a target catalog and schema pair. This results in a collision when a user maps two tables from a single source schema to different target catalog schema pairs, for example:

$ cat mapping.csv
catalog_name,dst_schema,dst_table,src_schema,src_table,workspace_name
catalog1,schema1,table1,schema1,table1,workspace
catalog1,schema2,table2,schema1,table2,workspace

Expected Behavior

The user should be able to map tables from the same source schema to different target schemas.

Steps To Reproduce

Extend the unit test with the example above in the current behavior.

Cloud

Azure

Operating System

macOS

Version

latest via Databricks CLI

Relevant log output

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
2 participants