Skip to content

Row validation of NULL UUIDs in Oracle produces an incorrect value #1716

@nj1973

Description

@nj1973

Describe the bug
Oracle GUID is output in a different format to PostgreSQL UUID, we create a consistent value across the two engines by using a fairly complex expression in the Oracle SQL statement. For example:

concat(
  concat(
    concat(
      concat(
        concat(
          concat(
            concat(
              concat(substr(lower(rawtohex(t1.col_uuid)), :param_1 + :param_2, :param_3), :param_4),
              substr(lower(rawtohex(t1.col_uuid)), :param_5 + :param_6, :param_7)
            ),
            :param_8
          ),
          substr(lower(rawtohex(t1.col_uuid)), :param_9 + :param_10, :param_11)
        ),
        :param_12
      ),
      substr(lower(rawtohex(t1.col_uuid)), :param_13 + :param_14, :param_15)
    ),
    :param_16
  ),
  substr(lower(rawtohex(t1.col_uuid)), :param_17 + :param_18, :param_19)
) AS cast_uuid_string__col_uuid

Unfortunately when the GUID is NULL the expression above outputs:

----

We need to revisit this.

What version of DVT are you using?
8.5.2

What type of connections are you using for source and target?
Oracle/PostgreSQL

Screenshots
If applicable, add screenshots to help explain your problem.

How are you executing DVT?
Ex: CLI commands on local computer or VM, within a DAG, Cloud Run job, etc

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions