From 611cc2ddb52452a90fca9e20e577dafba866e887 Mon Sep 17 00:00:00 2001 From: Aseem Bansal Date: Thu, 24 Mar 2022 19:59:52 +0530 Subject: [PATCH] fix(snowflake): don't recommend accountadmin role for snowflake (#4481) --- .../ingestion/source_config/usage/snowflake_usage.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/metadata-ingestion/src/datahub/ingestion/source_config/usage/snowflake_usage.py b/metadata-ingestion/src/datahub/ingestion/source_config/usage/snowflake_usage.py index 415bfb163a..5eff5e6ebd 100644 --- a/metadata-ingestion/src/datahub/ingestion/source_config/usage/snowflake_usage.py +++ b/metadata-ingestion/src/datahub/ingestion/source_config/usage/snowflake_usage.py @@ -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",