# 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/utils.py
# def get_from_dict_and_assert(
#     config_id: str,
#     kwargs: typing.Dict,
#     key: str,
#     assertion: typing.Callable[[typing.Any], bool] = None,
#     error_msg: str = None,
# ) -> typing.Any:
#     value = kwargs.get(key, None)
#     assert_not_none_or_empty(
#         value, f"Config ID: {config_id} must define non-empty value: '{key}'."
#     )
#     if assertion and not assertion(value):
#         raise ValueError(
#             f"Assertion failed on value {value}.\n"
#             f"Config ID: {config_id}, kwargs: {kwargs}.\n"
#             f"Error: {error_msg}"
#         )
#     return value


from dataclasses import dataclass
from enum import Enum
from enum import unique
from clouddq.utils import assert_not_none_or_empty
from clouddq.utils import get_from_dict_and_assert
        Returns:

        """

        return dict(self.to_dict().get(self.column_id))


@unique
class DatabaseType(str, Enum):
    """ """

    BIGQUERY = "BIGQUERY"
    DATAPLEX = "DATAPLEX"

    def get_column_type(
        self: DqEntityColumn, column_type: DatabaseColumnType | str
    ) -> str:
        if type(column_type) != DatabaseColumnType:
            column_type = DatabaseColumnType(column_type)
        if self == DatabaseType.BIGQUERY:
            database_column_type = BIGQUERY_COLUMN_TYPES_MAPPING.get(column_type, None)
            assert_not_none_or_empty(
                database_column_type,
                f"Database: {self} does not have type {column_type} "
                f"defined in column type mapping."
                f"Current mapping: {BIGQUERY_COLUMN_TYPES_MAPPING}",
            )
            return database_column_type
        if self == DatabaseType.DATAPLEX:
            database_column_type = BIGQUERY_COLUMN_TYPES_MAPPING.get(column_type, None)

# 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/utils.py
# def get_from_dict_and_assert(
#     config_id: str,
#     kwargs: typing.Dict,
#     key: str,
#     assertion: typing.Callable[[typing.Any], bool] = None,
#     error_msg: str = None,
# ) -> typing.Any:
#     value = kwargs.get(key, None)
#     assert_not_none_or_empty(
#         value, f"Config ID: {config_id} must define non-empty value: '{key}'."
#     )
#     if assertion and not assertion(value):
#         raise ValueError(
#             f"Assertion failed on value {value}.\n"
#             f"Config ID: {config_id}, kwargs: {kwargs}.\n"
#             f"Error: {error_msg}"
#         )
#     return value


# Path: clouddq/classes/dq_entity_column.py
from dataclasses import dataclass
from enum import Enum
from enum import unique
from clouddq.utils import assert_not_none_or_empty
from clouddq.utils import get_from_dict_and_assert

        Returns:

        """

        return dict(self.to_dict().get(self.column_id))


@unique
class DatabaseType(str, Enum):
    """ """

    BIGQUERY = "BIGQUERY"
    DATAPLEX = "DATAPLEX"

    def get_column_type(
        self: DqEntityColumn, column_type: DatabaseColumnType | str
    ) -> str:
        if type(column_type) != DatabaseColumnType:
            column_type = DatabaseColumnType(column_type)
        if self == DatabaseType.BIGQUERY:
            database_column_type = BIGQUERY_COLUMN_TYPES_MAPPING.get(column_type, None)
            assert_not_none_or_empty(
                database_column_type,
                f"Database: {self} does not have type {column_type} "
                f"defined in column type mapping."
                f"Current mapping: {BIGQUERY_COLUMN_TYPES_MAPPING}",
            )
            return database_column_type
        if self == DatabaseType.DATAPLEX:
            database_column_type = BIGQUERY_COLUMN_TYPES_MAPPING.get(column_type, None)

            assert_not_none_or_empty(