class_docstr: This handler handles connection and execution of the Snowflake statements.
class_docstr_tok: ["This","handler","handles","connection","and","execution","of","the","Snowflake","statements","."]
docstr: Check the connection
  :return: success status and error message if error occurs
docstr_tok: ["Check","the","connection",":","return",":","success","status","and","error","message","if","error","occurs"]
code: def check_connection(self) -> StatusResponse:
      """
      Check the connection
      :return: success status and error message if error occurs
      """
      response = StatusResponse(False)
      need_to_close = self.is_connected is False
      try:
          connection = self.connect()
          with connection.cursor() as cur:
              cur.execute("select 1;")
          response.success = True
      except connector.errors.Error as e:
          logger.error(
              f'Error connecting to Snowflake {self.connection_data["database"]}, {e}!'
          )
          response.error_message = e
  
      if response.success is True and need_to_close:
          self.disconnect()
  
      if response.success is False and self.is_connected is True:
          self.is_connected = False
      return response
  
file_path: mindsdb/mindsdb/integrations/handlers/snowflake_handler/snowflake_handler.py
imports: from pandas import DataFrame
  from snowflake import connector
  from snowflake.sqlalchemy import snowdialect
  from mindsdb_sql.render.sqlalchemy_render import SqlalchemyRender
  from mindsdb_sql.parser.ast.base import ASTNode
  from mindsdb.integrations.libs.base import DatabaseHandler
  from mindsdb.integrations.libs.response import HandlerStatusResponse, HandlerResponse, RESPONSE_TYPE
  from mindsdb.utilities import log
label_desc: Use image node_id 4 for calling the SnowflakeHandler obj's underlying member method code with example usage: obj.check_connection() and returns: response