fix(snowflake): don't recommend accountadmin role for snowflake (#4481)

This commit is contained in:
Aseem Bansal 2022-03-24 19:59:52 +05:30 committed by GitHub
parent dcd4af51bb
commit 611cc2ddb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,17 +38,6 @@ class SnowflakeUsageConfig(
apply_view_usage_to_tables: bool = False
stateful_ingestion: Optional[SnowflakeStatefulIngestionConfig] = None
@pydantic.validator("role", always=True)
def role_accountadmin(cls, v):
if not v or v.lower() != "accountadmin":
# This isn't an error, since the privileges can be delegated to other
# roles as well: https://docs.snowflake.com/en/sql-reference/account-usage.html#enabling-account-usage-for-other-roles
logger.info(
'snowflake usage tables are only accessible by role "accountadmin" by default; you set %s',
v,
)
return v
def get_sql_alchemy_url(self):
return super().get_sql_alchemy_url(
database="snowflake",