mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-01 19:18:05 +00:00
Snowflake Make Query tag Optional (#6114)
* Snowflake make query tag optional * Modified Description
This commit is contained in:
parent
7b6332edef
commit
da559150c1
@ -65,9 +65,8 @@
|
||||
},
|
||||
"queryTag": {
|
||||
"title": "Query Tag",
|
||||
"description": "Session query tag used to monitor usage on snoflake",
|
||||
"type": "string",
|
||||
"default": "OpenMetadata"
|
||||
"description": "Session query tag used to monitor usage on snoflake. To use a query tag snowflake user should have enough privileges to alter the session.",
|
||||
"type": "string"
|
||||
},
|
||||
"privateKey": {
|
||||
"title": "Private Key",
|
||||
|
||||
@ -135,11 +135,12 @@ class SnowflakeSource(CommonDbSourceService):
|
||||
"""
|
||||
Method to set query tag for current session
|
||||
"""
|
||||
self.engine.execute(
|
||||
SNOWFLAKE_SESSION_TAG_QUERY.format(
|
||||
query_tag=self.service_connection.queryTag
|
||||
if self.service_connection.queryTag:
|
||||
self.engine.execute(
|
||||
SNOWFLAKE_SESSION_TAG_QUERY.format(
|
||||
query_tag=self.service_connection.queryTag
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
def get_database_names(self) -> Iterable[str]:
|
||||
configured_db = self.config.serviceConnection.__root__.config.database
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user