class_docstr: Performs a simple value check using sql code.
  
  :param sql: the sql to be executed. (templated)
  :param conn_id: the connection ID used to connect to the database.
  :param database: name of database which overwrite the defined one in connection
class_docstr_tok: ["Performs","a","simple","value","check","using","sql","code",".",":","param","sql",":","the","sql","to","be","executed",".","(","templated",")",":","param","conn_id",":","the","connection","ID","used","to","connect","to","the","database",".",":","param","database",":","name","of","database","which","overwrite","the","defined","one","in","connection"]
code: def check_value(self, records):
      if not records:
          self._raise_exception(
              f"The following query returned zero rows: {self.sql}"
          )
  
      pass_value_conv = _convert_to_float_if_possible(self.pass_value)
      is_numeric_value_check = isinstance(pass_value_conv, float)
  
      error_msg = (
          f"Test failed.\n"
          f"Pass value:{pass_value_conv}\n"
          f"Tolerance:{f'{self.tol:.1%}' if self.tol is not None else None}\n"
          f"Query:\n{self.sql}\n"
          f"Results:\n{records!s}"
      )
  
      if not is_numeric_value_check:
          tests = self._get_string_matches(records, pass_value_conv)
      elif is_numeric_value_check:
          try:
              numeric_records = self._to_float(records)
          except (ValueError, TypeError):
              raise AirflowException(
                  f"Converting a result to float failed.\n{error_msg}"
              )
          tests = self._get_numeric_matches(
              numeric_records, pass_value_conv
          )
      else:
          tests = []
  
      if not all(tests):
          self._raise_exception(error_msg)
  
imports: from __future__ import annotations
  import ast
  import re
  from functools import cached_property
  from typing import TYPE_CHECKING, Any, Callable, Iterable, Mapping, NoReturn, Sequence, SupportsAbs
  from airflow.exceptions import AirflowException, AirflowFailException
  from airflow.hooks.base import BaseHook
  from airflow.models import BaseOperator, SkipMixin
  from airflow.providers.common.sql.hooks.sql import DbApiHook, fetch_all_handler, return_single_query_results
  from airflow.utils.helpers import merge_dicts
label_desc: Use image node_id 2 for calling the SQLValueCheckOperator obj's underlying member method code with example usage: obj.check_value(records) without return types