ExamGecko
Question list
Search
Search

Question 18 - DSA-C02 discussion

Report
Export

A Data Scientist as data providers require to allow consumers to access all databases and database objects in a share by granting a single privilege on shared databases. Which one is incorrect SnowSQL command used by her while doing this task?

Assuming:

A database named product_db exists with a schema named product_agg and a table named Item_agg.

The database, schema, and table will be shared with two accounts named xy12345 and yz23456.

1. USE ROLE accountadmin;

2. CREATE DIRECT SHARE product_s;

3. GRANT USAGE ON DATABASE product_db TO SHARE product_s;

4. GRANT USAGE ON SCHEMA product_db. product_agg TO SHARE product_s;

5. GRANT SELECT ON TABLE sales_db. product_agg.Item_agg TO SHARE product_s;

6. SHOW GRANTS TO SHARE product_s;

7. ALTER SHARE product_s ADD ACCOUNTS=xy12345, yz23456;

8. SHOW GRANTS OF SHARE product_s;

A.
GRANT USAGE ON DATABASE product_db TO SHARE product_s;
Answers
A.
GRANT USAGE ON DATABASE product_db TO SHARE product_s;
B.
CREATE DIRECT SHARE product_s;
Answers
B.
CREATE DIRECT SHARE product_s;
C.
GRANT SELECT ON TABLE sales_db. product_agg.Item_agg TO SHARE product_s;
Answers
C.
GRANT SELECT ON TABLE sales_db. product_agg.Item_agg TO SHARE product_s;
D.
ALTER SHARE product_s ADD ACCOUNTS=xy12345, yz23456;
Answers
D.
ALTER SHARE product_s ADD ACCOUNTS=xy12345, yz23456;
Suggested answer: C

Explanation:

CREATE SHARE product_s is the correct Snowsql command to create Share object.

Rest are correct ones.

https://docs.snowflake.com/en/user-guide/data-sharing-provider#creating-a-share-using-sql

asked 23/09/2024
Kristina Stojanovska
42 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first