I am trying to use the Salesforce Analytics (Tableau-CRM) Snowflake output connector but getting the below error from Snowflake.
SQL access control error: Insufficient privileges to operate on table stage 'TEST_NZ_EMP'
when the JDBC 3.12.2 connector runs the below command.`
put file:///data/00Db0000000d/8Mo/.elt_maestro_elt.00Db0000000d8Mo.03C5p000003eKXMEA2_maestro_11149256732875375332/tmp03C5p000003eKXMEA2.896586859/GetFromGateway_g.38fe869b-0e3d-4500-87b0-45c2449898db/output-aggregate-folder25db8c0f-941b-4cfc-a049-fee9295e1d44/TEST_NZ_EMP_* @%"TEST_NZ_EMP"/qFgpy auto_compress=true overwrite=true;
The account has been given the following permissions using this article for instructions https://www.snowflake.com/blog/integrating-salesforce-data-with-snowflake-using-tableau-crm-sync-out/
GRANT USAGE ON DATABASE SYNC_DB TO ROLE SYNCOUT;
GRANT USAGE, CREATE TABLE, CREATE STAGE ON SCHEMA SYNC_DB.SYNCOUT TO ROLE SYNCOUT;
GRANT SELECT, INSERT, UPDATE, DELETE, TRUNCATE ON FUTURE TABLES IN SCHEMA SYNC_DB.SYNCOUT TO ROLE SYNCOUT;
Any suggestions on what other permission could be required? Thank you
You need to have OWNERSHIP on the table to be able to stage files.
From our documentation:
Note that a table stage is not a separate database object; rather, it is an implicit stage tied to the table itself. A table stage has no grantable privileges of its own. To stage files to a table stage, list the files, query them on the stage, or drop them, you must be the table owner (have the role with the OWNERSHIP privilege on the table).
For more information, read here