Created on 08-06-2024 04:26 AM - edited 08-06-2024 06:26 AM
IHi All,
I am getting one issue while updating my existing entity using PUT calls.
I have downloaded json by using GET and i just trying to update my entity (i have tried updating description also tried not updating anything and PUT as it is ) using PUT operation and its failing with same reason -
"errorCode":"ATLAS-400-00-023","errorMessage":"Attribute null not found for type hive_table"
could you please advise how did you update the entity using PUT command ?
curl --negotiate -u : -X PUT -H "Content-Type: application/json" https://myURL:portNumber/api/atlas/v2/entity/guid/<myGuid>-d @downloaded_entity.json
i have referred this post , however its not showing how to perform PUT operation. Solved: Re: PARTIAL UPDATE APACHE ATLAS ENTITY GUI - Cloudera Community - 297845
so my question is - Does atals REST PAI allows updating entity ? my usecase is i want to update an hive table entity. I have hive table hive column relationship in place. now i want to update my hive-table entity by adding hive columns under attributes: { columns [...]}
Created 08-22-2024 05:31 AM
@bigdatacm Can you try this I hope it will work
i.e
curl " https://URL/api/atlas/v2/entity/guid/7g5678h9-4003-407a-ac00-791c7c53e6d5" \ -i -X GET --negotiate \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -u username:password >> test_oracle_tbl.json -k
and then modify the test_oracle_tbl.json and make a partial update to the entity
curl "https://hostname:port/api/atlas/v2/entity/uniqueAttribute/type/datsetname?attr:qualifiedName=name" -i -X GET --negotiate \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -u username:password -d@test_oracle_tbl.json -k
Created 08-21-2024 01:38 PM
@jhoney12 yes Atlas Rest API supports , but you need to download the JSON for the entity first.
i.e
curl " https://URL/api/atlas/v2/entity/guid/7g5678h9-4003-407a-ac00-791c7c53e6d5" \
-i -X GET --negotiate \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-u username:password >> test_oracle_tbl.json -k
and then modify the test_oracle_tbl.json and make a partial update to the entity
curl "https://hostname:port/api/atlas/v2/entity/uniqueAttribute/type/datsetname?attr:qualifiedName=name"
-i -X GET --negotiate \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-u username:password -d@test_oracle_tbl.json -k
Created 08-21-2024 01:40 PM
@jhoney12 https://atlas.apache.org/api/v2/resource_EntityREST.html#resource_EntityREST_partialUpdateEntityAttr...
Note-Entity Partial Update - Add/Update entity attribute identified by its GUID. Supports only uprimitive attribute type and entity references. does not support updation of complex types like arrays, maps Null updates are not possible
Created 08-22-2024 12:58 AM
Documentation saying syntax as follows.
PUT /v2/entity/guid/{guid}
Created 08-22-2024 05:31 AM
@bigdatacm Can you try this I hope it will work
i.e
curl " https://URL/api/atlas/v2/entity/guid/7g5678h9-4003-407a-ac00-791c7c53e6d5" \ -i -X GET --negotiate \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -u username:password >> test_oracle_tbl.json -k
and then modify the test_oracle_tbl.json and make a partial update to the entity
curl "https://hostname:port/api/atlas/v2/entity/uniqueAttribute/type/datsetname?attr:qualifiedName=name" -i -X GET --negotiate \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -u username:password -d@test_oracle_tbl.json -k
Created 08-26-2024 02:15 AM
yes, it works with PUT command in place not get command.