US 11,809,586 B2
Shared object discovery techniques
Damien Carru, New York, NY (US); Jeremy Yujui Chen, Waterloo (CA); Pui Kei Johnston Chu, Unionville (CA); Benoit Dageville, San Carlos, CA (US); and Subramanian Muralidhar, Mercer Island, WA (US)
Assigned to Snowflake Inc., Bozeman, MT (US)
Filed by Snowflake Inc., Bozeman, MT (US)
Filed on Nov. 3, 2022, as Appl. No. 17/980,427.
Application 17/980,427 is a continuation of application No. 17/580,341, filed on Jan. 20, 2022, granted, now 11,520,920.
Claims priority of provisional application 63/273,770, filed on Oct. 29, 2021.
Prior Publication US 2023/0135712 A1, May 4, 2023
This patent is subject to a terminal disclaimer.
Int. Cl. G06F 7/00 (2006.01); G06F 16/00 (2019.01); G06F 21/62 (2013.01); G06F 16/21 (2019.01); G06F 16/2455 (2019.01)
CPC G06F 21/6218 (2013.01) [G06F 16/213 (2019.01); G06F 16/24552 (2019.01)] 27 Claims
OG exemplary drawing
 
1. A method comprising:
invoking, via a role of a consumer account, an operation referencing a set of shared objects stored within a database of a provider account using an imported database of the consumer account that makes the set of shared objects available within the consumer account;
updating, by a processing device, a call context of the operation to save the imported database as a current database used to resolve the operation, wherein the imported database references a share created from the database of the provider account, the share having grants to the set of shared objects, and wherein the call context comprises a role used to resolve the operation, a virtual warehouse used to resolve the operation, the current database, and a schema used to resolve the operation;
discovering one or more database level objects in a context of the share referenced by the imported database;
obtaining each role granted to the share based on the one or more database level objects;
saving each of the one or more database level objects as a class object that includes a reference to the imported database as a database from which the database level object originated;
using the reference of each of the one or more database level objects to obtain each role granted to the share;
determining whether any role granted to the share has access to any of the set of shared objects; and
executing the operation for each of the set of shared objects to which any role granted to the share has access.