page244
331
GRANT SELECT ON ALL DYNAMIC TABLES IN SCHEMA tpc.share_owner TO ROLE
share_owner_role;
GRANT SELECT ON ALL MATERIALIZED VIEWS IN SCHEMA tpc.share_owner TO ROLE
share_owner_role;
Snowflake security model does not allow the creation of
GRANT
s for objects created in
the future. Attempting to do so generates an error, for example:
GRANT SELECT ON FUTURE TABLES IN SCHEMA tpc.share_owner TO
SHARE share_poc;
This results in this error: “Future grant on objects of type TABLE to SHARE is
restricted.”
Instead, you must
GRANT
entitlement after object creation as shown later within this
section.
Grant entitlement to a new role to use existing warehouses:
GRANT USAGE ON WAREHOUSE tpc_wh_xsmall TO ROLE share_owner_role;
GRANT USAGE ON WAREHOUSE tpc_wh_small TO ROLE share_owner_role;
GRANT USAGE ON WAREHOUSE tpc_wh_medium TO ROLE share_owner_role;
GRANT USAGE ON WAREHOUSE tpc_wh_large TO ROLE share_owner_role;
GRANT USAGE ON WAREHOUSE tpc_wh_xlarge TO ROLE share_owner_role;
Assign the share to the desired consumer account, noting there may be several
consuming accounts requiring service.
We will use your managed account to import your share.
USE ROLE accountadmin;
Replace
<SHARE ACCOUNT>
in the next SQL statement with the JSON
accountLocator
or
locator
attribute from your managed account created earlier.
ALTER SHARE share_poc ADD ACCOUNTS = <SHARE ACCOUNT>;
Noting your locator will differ, mine is as follows:
ALTER SHARE share_poc ADD ACCOUNTS = HR83528;
Chapter 9
Client expeCtations