You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by "Sidharth Kumar Mishra (Jira)" <ji...@apache.org> on 2021/05/26 00:18:00 UTC

[jira] [Commented] (ATLAS-4307) Atlas bulk clarification REST should be enhanced to associate classification to bulk entities with uniq attribute and type

    [ https://issues.apache.org/jira/browse/ATLAS-4307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17351410#comment-17351410 ] 

Sidharth Kumar Mishra commented on ATLAS-4307:
----------------------------------------------

With the change below three options will work -

Option 1 (Only with type name and list of uniq attributes)

curl --location --request POST 'http://atlas-host:31000/api/atlas/v2/entity/bulk/classification?skipFailedEntities=True' \
--header 'Authorization: Basic YWRtaW46YWRtaW4xMjM=' \
--header 'Content-Type: application/json' \
--data-raw '{
 "classification" : {
 "propagate" : false,
 "attributes" : {
 "type" : "false"
 },
 "typeName" : "TEST_TAG_TABLE"
 },
 "entitiesUniqAttributes" : [
 \{"qualifiedName": "db1.table43@cm"},
 \{"qualifiedName": "db1.table7@cm"},
 \{"qualifiedName": "db1.table55@cm"}],
 "entityTypeName" : "hive_table"
}'

Option 2 (Only with entity Guids)
curl --location --request POST 'http://atlas-host:31000/api/atlas/v2/entity/bulk/classification?skipFailedEntities=True' \
--header 'Authorization: Basic YWRtaW46YWRtaW4xMjM=' \
--header 'Content-Type: application/json' \
--data-raw '{
 "classification" : {
 "propagate" : false,
 "attributes" : {
 "type" : "false"
 },
 "typeName" : "TEST_TAG_TABLE"
 },
 "entityGuids" : ["f7288e81-46e4-4c88-b6c7-da092d6b6e35", "1793c6df-53a6-481b-a75c-c705f98d6900"],
 "entityTypeName" : "hive_table"
}'

Option 3 (With both entity GUIDs and type Name with list of uniq attributes)
curl --location --request POST 'http://atlas-host:31000/api/atlas/v2/entity/bulk/classification?skipFailedEntities=True' \
--header 'Authorization: Basic YWRtaW46YWRtaW4xMjM=' \
--header 'Content-Type: application/json' \
--data-raw '{
 "classification" : {
 "propagate" : false,
 "attributes" : {
 "type" : "false"
 },
 "typeName" : "TEST_TAG_TABLE"
 },
 "entitiesUniqAttributes" : [
 \{"qualifiedName": "db1.table43@cm"},
 \{"qualifiedName": "db1.table8@cm"},
 \{"qualifiedName": "db1.table55@cm"}],
 "entityGuids" : [
 "6d6ab082-9a62-4aea-97b7-2b7337173631",
 "9a0d3275-eb42-4229-ac51-6db1ddf3ccc6"],
 "entityTypeName" : "hive_table"
}'

> Atlas bulk clarification REST should be enhanced to associate classification to bulk entities with uniq attribute and type
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ATLAS-4307
>                 URL: https://issues.apache.org/jira/browse/ATLAS-4307
>             Project: Atlas
>          Issue Type: Bug
>            Reporter: Sidharth Kumar Mishra
>            Assignee: Sidharth Kumar Mishra
>            Priority: Major
>         Attachments: ATLAS-4307..patch
>
>
> Right now there is no REST to support this. The existing bulk add classification takes a list of GUIDs and associates the classification to them. The existing one should also take type name and list of unique attribute values for entities and tag the classification if it finds entries.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)