# Path: clouddq/utils.py
# def assert_not_none_or_empty(value: typing.Any, error_msg: str) -> None:
#     """
# 
#     Args:
#       value: typing.Any:
#       error_msg: str:
# 
#     Returns:
# 
#     """
#     if not value:
#         raise ValueError(error_msg)


from enum import Enum
from enum import unique
from pprint import pformat
from string import Template
from clouddq.utils import assert_not_none_or_empty
import re
            "The CTE 'data' contains the result of all filterings applied "
            f"in a rule_binding including any incremental fitlers, e.g.\n```"
            f"{SAMPLE_DATA_CTE}```"
        )
    custom_sql_arguments = params.get("custom_sql_arguments", "")
    if custom_sql_arguments:
        for argument in custom_sql_arguments:
            if f"${argument}" not in custom_sql_statement:
                raise ValueError(
                    f"RuleType: {RuleType.CUSTOM_SQL_STATEMENT} "
                    f"custom_sql_arguments '${argument}' not found in "
                    f"custom_sql_statement:\n {pformat(custom_sql_statement)}"
                )
            if params.get("rule_binding_arguments", {}).get(argument, None) is None:
                raise ValueError(
                    f"RuleType: {RuleType.CUSTOM_SQL_STATEMENT} "
                    f"custom_sql_arguments '{argument}' not found in "
                    f"input parameters:\n {pformat(params.get('rule_binding_arguments', {}))}"
                )

    if params.get("rule_binding_arguments"):
        custom_sql_statement = Template(custom_sql_statement).safe_substitute(
            params.get("rule_binding_arguments")
        )
    check_for_invalid_sql(RuleType.CUSTOM_SQL_STATEMENT, custom_sql_statement)
    return Template(custom_sql_statement)


def to_sql_regex(params: dict) -> Template:
    pattern = params.get("pattern", "")

# Path: clouddq/utils.py
# def assert_not_none_or_empty(value: typing.Any, error_msg: str) -> None:
#     """
# 
#     Args:
#       value: typing.Any:
#       error_msg: str:
# 
#     Returns:
# 
#     """
#     if not value:
#         raise ValueError(error_msg)


# Path: clouddq/classes/rule_type.py
from enum import Enum
from enum import unique
from pprint import pformat
from string import Template
from clouddq.utils import assert_not_none_or_empty
import re

            "The CTE 'data' contains the result of all filterings applied "
            f"in a rule_binding including any incremental fitlers, e.g.\n```"
            f"{SAMPLE_DATA_CTE}```"
        )
    custom_sql_arguments = params.get("custom_sql_arguments", "")
    if custom_sql_arguments:
        for argument in custom_sql_arguments:
            if f"${argument}" not in custom_sql_statement:
                raise ValueError(
                    f"RuleType: {RuleType.CUSTOM_SQL_STATEMENT} "
                    f"custom_sql_arguments '${argument}' not found in "
                    f"custom_sql_statement:\n {pformat(custom_sql_statement)}"
                )
            if params.get("rule_binding_arguments", {}).get(argument, None) is None:
                raise ValueError(
                    f"RuleType: {RuleType.CUSTOM_SQL_STATEMENT} "
                    f"custom_sql_arguments '{argument}' not found in "
                    f"input parameters:\n {pformat(params.get('rule_binding_arguments', {}))}"
                )

    if params.get("rule_binding_arguments"):
        custom_sql_statement = Template(custom_sql_statement).safe_substitute(
            params.get("rule_binding_arguments")
        )
    check_for_invalid_sql(RuleType.CUSTOM_SQL_STATEMENT, custom_sql_statement)
    return Template(custom_sql_statement)


def to_sql_regex(params: dict) -> Template:
    pattern = params.get("pattern", "")

    assert_not_none_or_empty(