The mdmID should be randomically defined if at least one field part of the crosswalk is NULL

Description

PRDE - Story default text according to the team DoR (Definition of Ready)

01 - PERSON OF CONTACT (PERSON THAT CAN ANSWER QUESTIONS ABOUT THE PROBLEM):
02 - PROBLEM (WHAT'S THE CURRENT PROBLEM SCENARIO OR PAIN TO BE RESOLVED?):

Explanation: https://docs.google.com/spreadsheets/d/1yMF2EBeQBxg71N8cL_Oyj0GDds7vYX-CJyeaBrsq004/edit#gid=1026336840

If I have a staging table with the following fields:

  • cod_empresa
  • cod_func
  • nome

And the fields cod_empresa and cod_func as part of the crosswalk.

If I sent the following data, these are the IDs we are creating:

cod_empresa cod_func nome mdmID
1 1 Robson 110ed9a6d9fe3cf6caddee5066a7b653
1 null Joana dbcc54034e919c75d28381844ffa7476
1 null Pedro dbcc54034e919c75d28381844ffa7476
[
    {
        "cod_empresa": "1",
        "cod_func": "1",
        "nome": "Robson"
    },
    {
        "cod_empresa": "1",
        "cod_func": null,
        "nome": "Joana"
    },
    {
        "cod_empresa": "1",
        "cod_func": null,
        "nome": "Pedro"
    }
]

For another table called pessoas, with the field cod_pessoa as crosswalk. These are the mdmID defined for the following cases:

cod_pessoa nome mdmID
null Joana b9359a28b4f646eab57c63448f7b957e
null Joana 520fd4d5aef0475f9e2b5343e70a038a
null Joana d846e4f645e3407a89392f4fb164ea54

I sent the following data to Carol several times

[
    {
        "cod_pessoa": null,
        "nome": "Joana"
    }
]

In order to validate the moment we define the random value (for single field with NULL value) I identified it should happen on intake service, the following case I sent 3 records with NULL values and all of them is preserved (with different mdmID). If I had sent 3 records on the same request with the same PK defined it would had preserved only one record from the request.

[
    {
        "cod_pessoa": null,
        "nome": "Carlos"
    },
{
        "cod_pessoa": null,
        "nome": "Carlos I"
    },
{
        "cod_pessoa": null,
        "nome": "Carlos II"
    }
]

By the end, it is expected that the mdmID assume a random value if at least one field that belongs to the crosswalk (PK) has a null value.

Otherwise, we are loosing granularity of the data.

03 - GOAL (DESCRIBE THE PROPOSED SOLUTION):
04 - WHO CAN USE THIS FEATURE (USER ROLES):
05 - ASSETS (FIGMA LINKS, RELEVANT DOCUMENTATION LINKS, JSON EXAMPLES, ETC):
06 - ACCEPTANCE CRITERIA:

  • The mdmID should assume a random value if at least one field that belongs to the crosswalk (PK) has a null value.

As aligned in this thread https://totvscarol.slack.com/archives/GC2E28W6S/p1699901205128239 , the random id will be used when any value of any crosswalk (when the staging has more than one) is null.

Activity

Automation for Jira 6 December 2023, 14:58 Jira Internal Users

This issue was automatically transitioned to DONE after being deployed to production on Github.

https://github.com/totvslabs/mdm/releases/tag/v4.90.0

Automation for Jira 6 December 2023, 14:58 Jira Internal Users

No associated issue on JIRA TOTVS BRAZIL.

Automation for Jira 6 December 2023, 13:51 Jira Internal Users

This issue was automatically transitioned to WAITING DEPLOY, as its linked QA regression issue has just reached WAITING DEPLOY status (PR was just merged into master branch in Github).

Automation for Jira 28 November 2023, 20:56 Jira Internal Users

This issue was automatically transitioned to REGRESSION, as its PR was just merged into qa branch in Github.

Automation for Jira 28 November 2023, 20:56 Jira Internal Users

This issue was automatically transitioned to REGRESSION, as its PR was just merged into qa branch in Github.

Automation for Jira 28 November 2023, 20:56 Jira Internal Users

This issue was automatically transitioned to REGRESSION, as its PR was just merged into qa branch in Github.

Automation for Jira 28 November 2023, 20:56 Jira Internal Users

This issue was automatically transitioned to REGRESSION, as its PR was just merged into qa branch in Github.

Automation for Jira 28 November 2023, 14:59 Jira Internal Users

This issue was automatically transitioned to TESTED & MERGED, as its PR was just merged into develop branch in Github. PR Approved by rfschroeder,douglascoimbra.

Automation for Jira 20 November 2023, 20:11 Jira Internal Users

@Robson Thanael Poffo ,
@Geny Isam Hamud Herrera , @Emerson Venancio , @Douglas Coimbra Lopes , @Emerson Venancio , @Renan Schroeder

This issue was planned to be delivered until 2023-12-11. You can check that by consulting the issue in the Due Date field.

Dates already planned for this issue: 2023-11-20, 2023-12-11

If External Issue Link field is filled, customer was also informed on JIRA TOTVS.

Douglas Coimbra Lopes 20 November 2023, 14:15 Jira Internal Users

The card was validated by the QA team. cc @Emerson Venancio @Gabriel DAmore Marciano

Automation for Jira 20 November 2023, 14:15 Jira Internal Users

Github user douglascoimbra has just approved a PR (added as Shard Assignee in this Jira issue).

feat: CAPL-4931 Done Use random id when any crosswalk field is null

Douglas Coimbra Lopes 20 November 2023, 13:38 Jira Internal Users
  • DOUBLE CROSSWALKS

INTAKE RECORD FULL FILLED

  • SECOND BATCH SENDING WITH ONE OF THE FIELDS NULL

Automation for Jira 17 November 2023, 18:45 Jira Internal Users

This issue was automatically transitioned to QA REVIEW, as its PR was just approved in Github.

Automation for Jira 16 November 2023, 15:36 Jira Internal Users

This issue was automatically transitioned to REVIEW, as its PR (not DRAFT and not WIP) was just created in Github.

feat: CAPL-4931 Done Use random id when any crosswalk field is null

Automation for Jira 30 October 2023, 20:33 Jira Internal Users

@Robson Thanael Poffo ,
@Geny Isam Hamud Herrera ,

This issue was planned to be delivered until 2023-11-20. You can check that by consulting the issue in the Due Date field.

Dates already planned for this issue: 2023-11-20

If External Issue Link field is filled, customer was also informed on JIRA TOTVS.