Skip to content

Commit c3cffa3

Browse files
committed
fix: apply grants to physical layer after promotion
1 parent 40af4ec commit c3cffa3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sqlmesh/core/snapshot/evaluator.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1793,6 +1793,9 @@ def promote(
17931793
# Apply grants to the virtual layer view
17941794
self._apply_grants(model, view_name, GrantsTargetLayer.VIRTUAL)
17951795

1796+
# Apply grants to the physical layer table
1797+
self._apply_grants(model, table_name, GrantsTargetLayer.PHYSICAL)
1798+
17961799
def demote(self, view_name: str, **kwargs: t.Any) -> None:
17971800
logger.info("Dropping view '%s'", view_name)
17981801
self.adapter.drop_view(view_name, cascade=False)

0 commit comments

Comments
 (0)