# 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
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""todo: add classes docstring."""
from __future__ import annotations





RE_FORBIDDEN_SQL = re.compile(r"([;#]|\-\-|\*\/|\/\*)")
NOT_NULL_SQL = Template("$column IS NOT NULL")
REGEX_SQL = Template("REGEXP_CONTAINS( CAST( $column  AS STRING), '$pattern' )")
NOT_BLANK_SQL = Template("TRIM($column) != ''")
SAMPLE_DATA_CTE = """
WITH
zero_record AS (
  SELECT
    '{{ row_filter_id }}' AS rule_binding_id,
),

# 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

#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""todo: add classes docstring."""
from __future__ import annotations





RE_FORBIDDEN_SQL = re.compile(r"([;#]|\-\-|\*\/|\/\*)")
NOT_NULL_SQL = Template("$column IS NOT NULL")
REGEX_SQL = Template("REGEXP_CONTAINS( CAST( $column  AS STRING), '$pattern' )")
NOT_BLANK_SQL = Template("TRIM($column) != ''")
SAMPLE_DATA_CTE = """
WITH
zero_record AS (
  SELECT
    '{{ row_filter_id }}' AS rule_binding_id,
),

data AS (