Given the statement template below, which database objects can be added to a share?(Select TWO).
GRANT < privilege > ON < object > < object_name > To SHARE < share_name > ;
Correct Answer: C,D
In Snowflake, shares are used to share data across different Snowflake accounts securely. When you create a share, you can include various database objects that you want to share with consumers. According to Snowflake ' s documentation, the types of objects that can be shared include tables, secure views, secure materialized views, and streams. Secure functions and stored procedures are not shareable objects. Tasks also cannot be shared directly. Therefore, the correct answers are streams (C) and tables (D).
To share a stream or a table, you use theGRANTstatement to grant privileges on these objects to a share. The syntax for sharing a table or stream involves specifying the type of object, the object name, and the share to which you are granting access. For example:
GRANTSELECTONTABLEmy_tableTOSHARE my_share;GRANTSELECTONSTREAM
my_streamTOSHARE my_share;
These commands grant the SELECT privilege on a table namedmy_tableand a stream namedmy_streamto a share namedmy_share. This enables the consumer of the share to access these objects according to the granted privileges.
Reference: Snowflake Documentation on Shares and Database Objects (https://docs.snowflake.com)