open-metadata / OpenMetadata

OpenMetadata is a unified metadata platform for data discovery, data observability, and data governance powered by a central metadata repository, in-depth column level lineage, and seamless team collaboration.
https://open-metadata.org
Apache License 2.0
5.51k stars 1.04k forks source link

Tables are unlinked from dataProducts when updating #17249

Closed AlekseevVadim closed 2 months ago

AlekseevVadim commented 3 months ago

Affected module backend

Describe the bug If the table linked to dataProduct is updated and the "dataProducts" attribute is not sent, then this attribute is cleared for the table. At the same time, the relationship between the table and the dataProduct is preserved and can be viewed from the dataProduct.

To Reproduce dataProduct_problem

1) Сhecked the dataProduct link on the table page 2) Checked the presence of a filled "dataProducts" attribute for the table via a get request 3) Updated the table via a put request 4) Checked that the dataProduct link is not displayed on the table page 5) Checked that the link to the table is displayed on the dataProduct page 6) Checked that the table's relationship with the dataProduct is not displayed via the table's get request

Expected behavior The "dataProducts" attribute of the table should not be cleared when updating the table. This should work for other types of objects (dashboards, etc.)

Version:

AlekseevVadim commented 3 months ago

Also, I noticed that if you update the table as described above, and then start reindexing, then the relationship between the table and the dataProduct will disappear from the dataProduct page.

AlekseevVadim commented 3 months ago

Also, this bug may be related to the problem with the data Products attribute, which I wrote about in Slack https://openmetadata.slack.com/archives/C02B6955S4S/p1722521029437719

harshach commented 2 months ago

@AlekseevVadim you are doing a PUT operation. If you are doing PUT you cannot have partial document updating it, if you do then yes you'll see relations missing like you are showing if you want to do partial updates to the document, use PATCH

image
AlekseevVadim commented 1 month ago

@harshach Why is this problem only with the "dataProduct" attribute? The "tags", "domain", "owner" attributes are not lost during the put operation.