0

I am using Snowpark with Python 3.8.

I have successfully executed a CREATE OR REPLACE TABLE statement from my code.

However when I add this next line of code

df1 = session.create_dataframe(data)

I receive a privileges error:

<<<Insufficient privileges to operate on schema 'SNOWPARK'>>>

Can anyone assist in explaining what additional privileges are required to create a dataframe?

Nick Hall
  • 49
  • 1
  • 11

2 Answers2

0

Looks like the role does not have the right privilege.

You will need to grant the role the privilege to use the schema like so:

grant usage on schema snowpark to role <role_name>;
Sheng
  • 146
  • 2
0

There is no such special privileges needed to create dataframe from a table via Snowflake python snowpark, the user must have usage privilege on the database, schema etc.

You can check the roles/privileges granted to the user and if not granted, please grant via accountadmin.

Commands:

desc user <username>;
show grants to user <username>;
show grants to role <rolename>;
grant usage on database <dbname> to role 
<role_name>;
grant usage on schema <schename> to role 
<role_name>;
grant role <role_name> to user <username>;

Please try.

Thanks, Sujan