PUBLIC Schema in Snowflake Database

Viewed 985

A Public schema is created when we create a database and tables are created under Public schema if we don't specify any schema. Can you please tell me if you see or faced any issues in dropping Public schema from the database as I don't want anyone to create tables under Public schema.

2 Answers

Dropping public schema is not a good choice. That's the behaviors of snowflake to create table in the public schema to when user haven't specified the schema. So do a role based access control if you don't wanted to use public schema.

Technically nothing stands in the way of removing it.

I am deliberately dropping the Public schema from new databases, because I want users to create more meaningful names. This way we avoid having this general purpose schema. It requires more care and thoughtfulness from developers, which I find productive.

Also, the PUBLIC schema is actually public, which makes it harder to control access. I don't want any schema to be public by default in my databases. I mean - yes, we can grant public access to some schemas, but it has to be a conscious decision. Dropping the public schema requires more effort but guaranties that no access will be granted thoughtlessly.

Related