-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74691/
-----------------------------------------------------------

(Updated Jan. 2, 2024, 10:35 a.m.)


Review request for atlas, Jayendra Parab, Mandar Ambawane, Pinal Shah, and 
Sheetal Shah.


Bugs: ATLAS-4802
    https://issues.apache.org/jira/browse/ATLAS-4802


Repository: atlas


Description
-------

When updating the business metadata and Labels on an atlas entity, the 
'updateTime' system attribute is not changed.

Updates to other aspects, such as technical properties and user defined 
attributes does update the timestamp, but not the business metadata and labels.


Diffs
-----

  
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
 c670740c9 


Diff: https://reviews.apache.org/r/74691/diff/2/


Testing (updated)
-------

update time Without patch
before business metadata update

"createTime": 1703221384530,
"updateTime": 1703221386989,        
        
after business metadata update        

"createTime": 1703221384530,
"updateTime": 1703221386989,


after applying PATCH

before business metadata update
"createTime": 1704190056433,
"updateTime": 1704190059208,

after business metadata update                
"createTime": 1704190056433,
"updateTime": 1704190523323,

Entire json for GET api on entity before applying patch :

http://localhost:21000/api/atlas/v2/entity/guid/dc1baa88-3a07-4577-9b6b-48982253aa3d
    
{
    "referredEntities": {
        "a1a27e35-aa0d-472d-8b94-2405d8001a84": {
            "typeName": "Column",
            "attributes": {
                "qualifiedName": "Sales.customer_dim.address@cl1",
                "name": "address",
                "comment": "customer address"
            },
            "guid": "a1a27e35-aa0d-472d-8b94-2405d8001a84",
            "isIncomplete": false,
            "status": "ACTIVE",
            "createdBy": "admin",
            "updatedBy": "admin",
            "createTime": 1704190056433,
            "updateTime": 1704190056433,
            "version": 0,
            "classifications": [
                {
                    "typeName": "PII",
                    "entityGuid": "a1a27e35-aa0d-472d-8b94-2405d8001a84",
                    "entityStatus": "ACTIVE",
                    "propagate": true,
                    "removePropagationsOnEntityDelete": false
                }
            ],
            "labels": []
        },
        "834ba687-c8f1-4a48-a6a0-ef3ddeadf7ee": {
            "typeName": "Column",
            "attributes": {
                "qualifiedName": "Sales.customer_dim.name@cl1",
                "name": "name",
                "comment": "customer name"
            },
            "guid": "834ba687-c8f1-4a48-a6a0-ef3ddeadf7ee",
            "isIncomplete": false,
            "status": "ACTIVE",
            "createdBy": "admin",
            "updatedBy": "admin",
            "createTime": 1704190056433,
            "updateTime": 1704190056433,
            "version": 0,
            "classifications": [
                {
                    "typeName": "PII",
                    "entityGuid": "834ba687-c8f1-4a48-a6a0-ef3ddeadf7ee",
                    "entityStatus": "ACTIVE",
                    "propagate": true,
                    "removePropagationsOnEntityDelete": false
                }
            ],
            "labels": []
        },
        "f8ded729-7bad-48dd-9969-c5b36a8d5b9c": {
            "typeName": "Column",
            "attributes": {
                "qualifiedName": "Sales.customer_dim.customer_id@cl1",
                "name": "customer_id",
                "comment": "customer id"
            },
            "guid": "f8ded729-7bad-48dd-9969-c5b36a8d5b9c",
            "isIncomplete": false,
            "status": "ACTIVE",
            "createdBy": "admin",
            "updatedBy": "admin",
            "createTime": 1704190056433,
            "updateTime": 1704190056433,
            "version": 0,
            "classifications": [
                {
                    "typeName": "PII",
                    "entityGuid": "f8ded729-7bad-48dd-9969-c5b36a8d5b9c",
                    "entityStatus": "ACTIVE",
                    "propagate": true,
                    "removePropagationsOnEntityDelete": false
                }
            ],
            "labels": []
        },
        "06f3f56c-8ed7-4930-93b3-8a4b6f81c505": {
            "typeName": "StorageDesc",
            "attributes": {
                "qualifiedName": "sd:hdfs://host:8000/apps/warehouse/sales@cl1",
                "name": "sd:hdfs://host:8000/apps/warehouse/sales"
            },
            "guid": "06f3f56c-8ed7-4930-93b3-8a4b6f81c505",
            "isIncomplete": false,
            "status": "ACTIVE",
            "createdBy": "admin",
            "updatedBy": "admin",
            "createTime": 1704190055353,
            "updateTime": 1704190058427,
            "version": 0,
            "labels": []
        }
    },
    "entity": {
        "typeName": "Table",
        "attributes": {
            "owner": "fetl",
            "temporary": false,
            "lastAccessTime": 1704190056426,
            "replicatedTo": null,
            "userDescription": null,
            "replicatedFrom": null,
            "qualifiedName": "customer_dim@cl1",
            "displayName": null,
            "description": "customer dimension table",
            "viewExpandedText": null,
            "tableType": "External",
            "createTime": 1704190056426,
            "name": "customer_dim",
            "retention": 1704190056426,
            "viewOriginalText": null
        },
        "guid": "dc1baa88-3a07-4577-9b6b-48982253aa3d",
        "isIncomplete": false,
        "status": "ACTIVE",
        "createdBy": "admin",
        "updatedBy": "admin",
        "createTime": 1704190056433,
        "updateTime": 1704190523323,
        "version": 0,
        "relationshipAttributes": {
            "inputToProcesses": [],
            "pipeline": null,
            "schema": [],
            "sd": {
                "guid": "06f3f56c-8ed7-4930-93b3-8a4b6f81c505",
                "typeName": "StorageDesc",
                "entityStatus": "ACTIVE",
                "displayText": "sd:hdfs://host:8000/apps/warehouse/sales",
                "relationshipType": "Table_StorageDesc",
                "relationshipGuid": "bcdaa1e2-14fe-4431-aab4-c8385f086cf5",
                "relationshipStatus": "ACTIVE",
                "relationshipAttributes": {
                    "typeName": "Table_StorageDesc"
                },
                "qualifiedName": "sd:hdfs://host:8000/apps/warehouse/sales@cl1"
            },
            "view": {
                "guid": "4748f7c1-d1ae-4449-ba15-d8635080ab32",
                "typeName": "View",
                "entityStatus": "ACTIVE",
                "displayText": "customer_dim_view",
                "relationshipType": "View_Tables",
                "relationshipGuid": "b794ddaf-2595-49ca-b558-d74b7cf78950",
                "relationshipStatus": "ACTIVE",
                "relationshipAttributes": {
                    "typeName": "View_Tables"
                },
                "qualifiedName": "customer_dim_view@cl1"
            },
            "columns": [
                {
                    "guid": "a1a27e35-aa0d-472d-8b94-2405d8001a84",
                    "typeName": "Column",
                    "entityStatus": "ACTIVE",
                    "displayText": "address",
                    "relationshipType": "Table_Columns",
                    "relationshipGuid": "4184edf7-899e-429c-b6ec-18c2c27a912f",
                    "relationshipStatus": "ACTIVE",
                    "relationshipAttributes": {
                        "typeName": "Table_Columns"
                    },
                    "qualifiedName": "Sales.customer_dim.address@cl1"
                },
                {
                    "guid": "834ba687-c8f1-4a48-a6a0-ef3ddeadf7ee",
                    "typeName": "Column",
                    "entityStatus": "ACTIVE",
                    "displayText": "name",
                    "relationshipType": "Table_Columns",
                    "relationshipGuid": "8195ca0a-62c2-4220-a06c-436e9175e52f",
                    "relationshipStatus": "ACTIVE",
                    "relationshipAttributes": {
                        "typeName": "Table_Columns"
                    },
                    "qualifiedName": "Sales.customer_dim.name@cl1"
                },
                {
                    "guid": "f8ded729-7bad-48dd-9969-c5b36a8d5b9c",
                    "typeName": "Column",
                    "entityStatus": "ACTIVE",
                    "displayText": "customer_id",
                    "relationshipType": "Table_Columns",
                    "relationshipGuid": "3ec95fa2-f71d-48d1-b8ba-5c25cc5834a9",
                    "relationshipStatus": "ACTIVE",
                    "relationshipAttributes": {
                        "typeName": "Table_Columns"
                    },
                    "qualifiedName": "Sales.customer_dim.customer_id@cl1"
                }
            ],
            "model": null,
            "meanings": [],
            "db": {
                "guid": "ab8ebf52-083f-47cb-be45-b4fcb2e8fa35",
                "typeName": "DB",
                "entityStatus": "ACTIVE",
                "displayText": "Sales",
                "relationshipType": "Table_DB",
                "relationshipGuid": "b2b4f2d9-444c-4825-adf7-2eca70e54e9f",
                "relationshipStatus": "ACTIVE",
                "relationshipAttributes": {
                    "typeName": "Table_DB"
                },
                "qualifiedName": "Sales@cl1"
            },
            "outputFromProcesses": []
        },
        "classifications": [
            {
                "typeName": "Dimension",
                "entityGuid": "dc1baa88-3a07-4577-9b6b-48982253aa3d",
                "entityStatus": "ACTIVE",
                "propagate": true,
                "removePropagationsOnEntityDelete": false
            }
        ],
        "businessAttributes": {
            "test_businessMetadata": {
                "attr1": 100
            }
        },
        "labels": []
    }
}

Entire json for output after patch applied :

{
    "referredEntities": {
        "04b9e4f1-f075-429d-bb04-82e55b6923d1": {
            "typeName": "Column",
            "attributes": {
                "qualifiedName": "Sales.customer_dim.address@cl1",
                "name": "address",
                "comment": "customer address"
            },
            "guid": "04b9e4f1-f075-429d-bb04-82e55b6923d1",
            "isIncomplete": false,
            "status": "ACTIVE",
            "createdBy": "admin",
            "updatedBy": "admin",
            "createTime": 1703221384530,
            "updateTime": 1703221384530,
            "version": 0,
            "classifications": [
                {
                    "typeName": "PII",
                    "entityGuid": "04b9e4f1-f075-429d-bb04-82e55b6923d1",
                    "entityStatus": "ACTIVE",
                    "propagate": true,
                    "removePropagationsOnEntityDelete": false
                }
            ],
            "labels": []
        },
        "d51ed76b-484a-46da-b2d1-f6a1abc791f9": {
            "typeName": "Column",
            "attributes": {
                "qualifiedName": "Sales.customer_dim.customer_id@cl1",
                "name": "customer_id",
                "comment": "customer id"
            },
            "guid": "d51ed76b-484a-46da-b2d1-f6a1abc791f9",
            "isIncomplete": false,
            "status": "ACTIVE",
            "createdBy": "admin",
            "updatedBy": "admin",
            "createTime": 1703221384530,
            "updateTime": 1703221384530,
            "version": 0,
            "classifications": [
                {
                    "typeName": "PII",
                    "entityGuid": "d51ed76b-484a-46da-b2d1-f6a1abc791f9",
                    "entityStatus": "ACTIVE",
                    "propagate": true,
                    "removePropagationsOnEntityDelete": false
                }
            ],
            "labels": []
        },
        "144c5e5b-4c41-4ce3-a5e2-7bdc7b242357": {
            "typeName": "Column",
            "attributes": {
                "qualifiedName": "Sales.customer_dim.name@cl1",
                "name": "name",
                "comment": "customer name"
            },
            "guid": "144c5e5b-4c41-4ce3-a5e2-7bdc7b242357",
            "isIncomplete": false,
            "status": "ACTIVE",
            "createdBy": "admin",
            "updatedBy": "admin",
            "createTime": 1703221384530,
            "updateTime": 1703221384530,
            "version": 0,
            "classifications": [
                {
                    "typeName": "PII",
                    "entityGuid": "144c5e5b-4c41-4ce3-a5e2-7bdc7b242357",
                    "entityStatus": "ACTIVE",
                    "propagate": true,
                    "removePropagationsOnEntityDelete": false
                }
            ],
            "labels": []
        },
        "1e6f9c15-a9dd-45f1-947a-93a9ae715b4d": {
            "typeName": "StorageDesc",
            "attributes": {
                "qualifiedName": "sd:hdfs://host:8000/apps/warehouse/sales@cl1",
                "name": "sd:hdfs://host:8000/apps/warehouse/sales"
            },
            "guid": "1e6f9c15-a9dd-45f1-947a-93a9ae715b4d",
            "isIncomplete": false,
            "status": "ACTIVE",
            "createdBy": "admin",
            "updatedBy": "admin",
            "createTime": 1703221383461,
            "updateTime": 1703221386314,
            "version": 0,
            "labels": []
        }
    },
    "entity": {
        "typeName": "Table",
        "attributes": {
            "owner": "fetl",
            "temporary": false,
            "lastAccessTime": 1703221384523,
            "replicatedTo": null,
            "userDescription": null,
            "replicatedFrom": null,
            "qualifiedName": "customer_dim@cl1",
            "displayName": null,
            "description": "customer dimension table",
            "viewExpandedText": null,
            "tableType": "External",
            "createTime": 1703221384523,
            "name": "customer_dim",
            "retention": 1703221384523,
            "viewOriginalText": null
        },
        "guid": "e3b61e68-d45c-4f34-a9ed-db4743a5468f",
        "isIncomplete": false,
        "status": "ACTIVE",
        "createdBy": "admin",
        "updatedBy": "admin",
        "createTime": 1703221384530,
        "updateTime": 1703221386989,
        "version": 0,
        "relationshipAttributes": {
            "inputToProcesses": [],
            "pipeline": null,
            "schema": [],
            "sd": {
                "guid": "1e6f9c15-a9dd-45f1-947a-93a9ae715b4d",
                "typeName": "StorageDesc",
                "entityStatus": "ACTIVE",
                "displayText": "sd:hdfs://host:8000/apps/warehouse/sales",
                "relationshipType": "Table_StorageDesc",
                "relationshipGuid": "274a2aa7-48bb-458c-9b29-271ff0f05cc7",
                "relationshipStatus": "DELETED",
                "relationshipAttributes": {
                    "typeName": "Table_StorageDesc"
                },
                "qualifiedName": "sd:hdfs://host:8000/apps/warehouse/sales@cl1"
            },
            "view": {
                "guid": "60525fab-09fe-45b5-9c25-f7e2b4011e95",
                "typeName": "View",
                "entityStatus": "ACTIVE",
                "displayText": "customer_dim_view",
                "relationshipType": "View_Tables",
                "relationshipGuid": "4e3047d3-4a3d-42bb-b128-2efd7dedb756",
                "relationshipStatus": "ACTIVE",
                "relationshipAttributes": {
                    "typeName": "View_Tables"
                },
                "qualifiedName": "customer_dim_view@cl1"
            },
            "columns": [
                {
                    "guid": "d51ed76b-484a-46da-b2d1-f6a1abc791f9",
                    "typeName": "Column",
                    "entityStatus": "ACTIVE",
                    "displayText": "customer_id",
                    "relationshipType": "Table_Columns",
                    "relationshipGuid": "5f50d242-f89c-48e2-b52a-be420d28c1bf",
                    "relationshipStatus": "ACTIVE",
                    "relationshipAttributes": {
                        "typeName": "Table_Columns"
                    },
                    "qualifiedName": "Sales.customer_dim.customer_id@cl1"
                },
                {
                    "guid": "04b9e4f1-f075-429d-bb04-82e55b6923d1",
                    "typeName": "Column",
                    "entityStatus": "ACTIVE",
                    "displayText": "address",
                    "relationshipType": "Table_Columns",
                    "relationshipGuid": "886daa08-f8be-4445-9853-05b61f004437",
                    "relationshipStatus": "ACTIVE",
                    "relationshipAttributes": {
                        "typeName": "Table_Columns"
                    },
                    "qualifiedName": "Sales.customer_dim.address@cl1"
                },
                {
                    "guid": "144c5e5b-4c41-4ce3-a5e2-7bdc7b242357",
                    "typeName": "Column",
                    "entityStatus": "ACTIVE",
                    "displayText": "name",
                    "relationshipType": "Table_Columns",
                    "relationshipGuid": "9ce71992-7a1f-48a3-bddc-d2ef3bec0e64",
                    "relationshipStatus": "ACTIVE",
                    "relationshipAttributes": {
                        "typeName": "Table_Columns"
                    },
                    "qualifiedName": "Sales.customer_dim.name@cl1"
                }
            ],
            "model": null,
            "meanings": [],
            "db": {
                "guid": "732b2db8-7c12-4886-9ac6-794628c8f39a",
                "typeName": "DB",
                "entityStatus": "ACTIVE",
                "displayText": "Sales",
                "relationshipType": "Table_DB",
                "relationshipGuid": "2c39096a-8eb8-48b7-8444-73a10824e684",
                "relationshipStatus": "ACTIVE",
                "relationshipAttributes": {
                    "typeName": "Table_DB"
                },
                "qualifiedName": "Sales@cl1"
            },
            "outputFromProcesses": []
        },
        "classifications": [
            {
                "typeName": "Dimension",
                "entityGuid": "e3b61e68-d45c-4f34-a9ed-db4743a5468f",
                "entityStatus": "ACTIVE",
                "propagate": true,
                "removePropagationsOnEntityDelete": false
            }
        ],
        "businessAttributes": {
            "test_businessMetadata": {
                "attr1": 20
            }
        },
        "labels": []
    }
}


Thanks,

chaitali

Reply via email to