# Path: clouddq/classes/rule_type.py
# class RuleType(str, Enum):
#     """ """
# 
#     CUSTOM_SQL_STATEMENT = "CUSTOM_SQL_STATEMENT"
#     CUSTOM_SQL_EXPR = "CUSTOM_SQL_EXPR"
#     NOT_NULL = "NOT_NULL"
#     REGEX = "REGEX"
#     NOT_BLANK = "NOT_BLANK"
# 
#     def to_sql(self: RuleType, params: dict | None) -> Template:
#         if self == RuleType.CUSTOM_SQL_EXPR:
#             return to_sql_custom_sql_expr(params)
#         elif self == RuleType.CUSTOM_SQL_STATEMENT:
#             return to_sql_custom_sql_statement(params)
#         elif self == RuleType.NOT_NULL:
#             return NOT_NULL_SQL
#         elif self == RuleType.REGEX:
#             return to_sql_regex(params)
#         elif self == RuleType.NOT_BLANK:
#             return NOT_BLANK_SQL
#         else:
#             raise NotImplementedError(f"Rule Type: {self} not implemented.")


from dataclasses import dataclass
from clouddq.classes.rule_type import RuleType
                )
            if not config["dimension"].upper() in rule_dims:
                raise ValueError(
                    f"Invalid rule dimension '{config['dimension'].upper()}' in "
                    f"rule configurations ID '{config_id}'. \n"
                    f"Ensure it is one of the allowed rule_dimensions: {rule_dims} or add it to "
                    f"the allowed list of dimensions in the 'rule_dimensions' YAML config node, e.g.\n"
                    f"```\nrule_dimensions:\n"
                    f"  - consistency\n"
                    f"  - correctness\n"
                    f"  - duplication\n"
                    f"  - completeness\n"
                    f"  - conformance\n"
                    f"  - integrity\n"
                    f"```"
                )

    @classmethod
    def from_dict(cls: DqRule, rule_id: str, kwargs: dict) -> DqRule:
        """

        Args:
          cls: DqRule:
          rule_id: str:
          kwargs: typing.Dict:

        Returns:

        """


# Path: clouddq/classes/rule_type.py
# class RuleType(str, Enum):
#     """ """
# 
#     CUSTOM_SQL_STATEMENT = "CUSTOM_SQL_STATEMENT"
#     CUSTOM_SQL_EXPR = "CUSTOM_SQL_EXPR"
#     NOT_NULL = "NOT_NULL"
#     REGEX = "REGEX"
#     NOT_BLANK = "NOT_BLANK"
# 
#     def to_sql(self: RuleType, params: dict | None) -> Template:
#         if self == RuleType.CUSTOM_SQL_EXPR:
#             return to_sql_custom_sql_expr(params)
#         elif self == RuleType.CUSTOM_SQL_STATEMENT:
#             return to_sql_custom_sql_statement(params)
#         elif self == RuleType.NOT_NULL:
#             return NOT_NULL_SQL
#         elif self == RuleType.REGEX:
#             return to_sql_regex(params)
#         elif self == RuleType.NOT_BLANK:
#             return NOT_BLANK_SQL
#         else:
#             raise NotImplementedError(f"Rule Type: {self} not implemented.")


# Path: clouddq/classes/dq_rule.py
from dataclasses import dataclass
from clouddq.classes.rule_type import RuleType

                )
            if not config["dimension"].upper() in rule_dims:
                raise ValueError(
                    f"Invalid rule dimension '{config['dimension'].upper()}' in "
                    f"rule configurations ID '{config_id}'. \n"
                    f"Ensure it is one of the allowed rule_dimensions: {rule_dims} or add it to "
                    f"the allowed list of dimensions in the 'rule_dimensions' YAML config node, e.g.\n"
                    f"```\nrule_dimensions:\n"
                    f"  - consistency\n"
                    f"  - correctness\n"
                    f"  - duplication\n"
                    f"  - completeness\n"
                    f"  - conformance\n"
                    f"  - integrity\n"
                    f"```"
                )

    @classmethod
    def from_dict(cls: DqRule, rule_id: str, kwargs: dict) -> DqRule:
        """

        Args:
          cls: DqRule:
          rule_id: str:
          kwargs: typing.Dict:

        Returns:

        """


        rule_type: RuleType = RuleType(kwargs.get("rule_type", ""))