Materialized views based on access rights
AssigneeSnowflake Inc.
InventorsPrasanna Rajaperumal, Thierry Cruanes, Allison Waingold Lee, Igor Demura, Jiaqi Yan, Benoit Dageville
Life of this patent
Estimating the term…
Abstract
The subject technology defines a materialized view over a source table that is associated with a first account of a database. The subject technology defines cross-account access rights to the materialized view for a second account. The subject technology modifies the source table for the materialized view. The subject technology identifies that the materialized view is stale with respect to the source table by merging the materialized view and the source table. The subject technology causes the materialized view to be refreshed with respect to the source table.
Claims30
A method comprising:
- defining a materialized view over a source table that is associated with a first account of a database;
- defining cross-account access rights to the materialized view for a second account, the cross-account access rights including view privileges to the materialized view by the second account;
- modifying the source table for the materialized view;
- identifying that the materialized view is stale with respect to the source table by merging the materialized view and the source table;
- causing the materialized view to be refreshed with respect to the source table based on a comparison of partitions associated with the materialized view and the source table after the merging;
- and
- sharing the refreshed materialized view to the second account in response to receiving a request from the second account to access the refreshed materialized view, the second account having access to the refreshed materialized view without copying the refreshed materialized view.
A system comprising:
- at least one processor;
- and
- a memory device including instructions, which when executed by the at least one processor, cause the at least one processor to perform operations comprising:
- defining a materialized view over a source table that is associated with a first account of a database;
- defining cross-account access rights to the materialized view for a second account, the cross-account access rights including view privileges to the materialized view by the second account;
- modifying the source table for the materialized view;
- identifying that the materialized view is stale with respect to the source table by merging the materialized view and the source table;
- causing the materialized view to be refreshed with respect to the source table based on a comparison of partitions associated with the materialized view and the source table after the merging;
- and
- sharing the refreshed materialized view to the second account in response to receiving a request from the second account to access the refreshed materialized view, the second account having access to the refreshed materialized view without copying the refreshed materialized view.
A non-transitory computer-readable medium comprising instructions, which when executed by at least one processor, cause the at least one processor to perform operations comprising:
- defining a materialized view over a source table that is associated with a first account of a database;
- defining cross-account access rights to the materialized view for a second account, the cross-account access rights including view privileges to the materialized view by the second account;
- modifying the source table for the materialized view;
- identifying that the materialized view is stale with respect to the source table by merging the materialized view and the source table;
- causing the materialized view to be refreshed with respect to the source table based on a comparison of partitions associated with the materialized view and the source table after the merging;
- and
- sharing the refreshed materialized view to the second account in response to receiving a request from the second account to access the refreshed materialized view, the second account having access to the refreshed materialized view without copying the refreshed materialized view.
Dependencies are inferred from the claim text.