mirror of
				https://github.com/open-metadata/OpenMetadata.git
				synced 2025-11-04 12:36:23 +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": {
 | 
					    "queryTag": {
 | 
				
			||||||
      "title": "Query Tag",
 | 
					      "title": "Query Tag",
 | 
				
			||||||
      "description": "Session query tag used to monitor usage on snoflake",
 | 
					      "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",
 | 
					      "type": "string"
 | 
				
			||||||
      "default": "OpenMetadata"
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "privateKey": {
 | 
					    "privateKey": {
 | 
				
			||||||
      "title": "Private Key",
 | 
					      "title": "Private Key",
 | 
				
			||||||
 | 
				
			|||||||
@ -135,11 +135,12 @@ class SnowflakeSource(CommonDbSourceService):
 | 
				
			|||||||
        """
 | 
					        """
 | 
				
			||||||
        Method to set query tag for current session
 | 
					        Method to set query tag for current session
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
        self.engine.execute(
 | 
					        if self.service_connection.queryTag:
 | 
				
			||||||
            SNOWFLAKE_SESSION_TAG_QUERY.format(
 | 
					            self.engine.execute(
 | 
				
			||||||
                query_tag=self.service_connection.queryTag
 | 
					                SNOWFLAKE_SESSION_TAG_QUERY.format(
 | 
				
			||||||
 | 
					                    query_tag=self.service_connection.queryTag
 | 
				
			||||||
 | 
					                )
 | 
				
			||||||
            )
 | 
					            )
 | 
				
			||||||
        )
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def get_database_names(self) -> Iterable[str]:
 | 
					    def get_database_names(self) -> Iterable[str]:
 | 
				
			||||||
        configured_db = self.config.serviceConnection.__root__.config.database
 | 
					        configured_db = self.config.serviceConnection.__root__.config.database
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user