[Improvement] Avoid initialising new SnowflakeConnector multiple times
Describe the feature
Currently in SnowflakeGrantsGenerator and SnowflakeSpecLoader, when querying Snowflake, SnowflakeConnector will be initialised multiple times. It would be better if we could try to pass SnowflakeConnector object as a variable in those functions or make SnowflakeConnector as a singleton. This will be helpful especially when applying permifrost via SSO login.
Describe alternatives you've considered
- We can consider passing
SnowflakeConnectoras a variable into those functions - We can consider using class attribute so that it can be directly referred
- We can consider making
SnowflakeConnectora singleton
Additional context
N.A.
Who will this benefit?
For people who are using SSO login method will be hugely benefitted. Otherwise every time when a new SnowflakeConnector is initialised, a new login window will be popped up for authentication.
Are you interested in contributing this feature?
Yes