Support Questions
Find answers, ask questions, and share your expertise

How to delete apache atlas tag from atlas UI in sandbox?

Solved Go to solution

How to delete apache atlas tag from atlas UI in sandbox?

Expert Contributor

Hi all,

I have downloaded sandbox at my end but on atlas UI,created so many tags now i want them to be deleted.

Anyone how to delete those tags using REST api?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to delete apache atlas tag from atlas UI in sandbox?

Guru

@Manoj Dhake

When you create a new Trait/Tag in the UI are are actually creating a new type. When you associate it with an entity you are creating an instance of the Trait as a STRUCT type that only exists in the context of that entity. As you know, you can delete instances of a tag that is assigned to an entity. However, to delete the tag so that it does not show up in Atlas UI you would need to delete the type. At the moment, types cannot be deleted since there may be entities or even other types that are dependent on them. You probably can delete the trait directly from HBase, however, you may also compromise the integrity of the entire Atlas system. You would also have to clear any dependents that are indexed in Solr or graphed in Titan. I am sure these are all issues that the community will have to solve in dealing implemeting the JIRA you referenced. To answer the follow-up question you asked in the comments sections, you can get the instance of a trait only from the entity where the trait is associated as follows:

curl -u admin:admin -X GET http://sandbox.hortonworks.com:21000/api/atlas/entities/fadaca14-7e58-4a2e-b04d-95a3010ce45b/traits

{"requestId":"qtp921483514-312 - bb0f1276-c8fc-499b-ab5d-0e4fde11c796","results":["PII"],"count":1}[root@sandbox ~]#

As you can see, this entity has a tag called PII and it does not have a GUID because it is STRUCT based on the PII type that represents PII trait. You can easily delete the STRUCT that is associated with an entity through the UI or REST api but there is now way to remove the type from which the trait is spawned for the reasons listed above.

View solution in original post

3 REPLIES 3

Re: How to delete apache atlas tag from atlas UI in sandbox?

Explorer

Currently in Atlas 0.7, it is not possible to delete the tags themselves either via UI or REST API but you can delete the association between an entity and a tag. This is a feature that will be implemented in the future.

Re: How to delete apache atlas tag from atlas UI in sandbox?

Expert Contributor

Thanks you svenkat,

Could you please check below link,

Here they are saying you need to add API code for ADD/DELETE tags.

what do you think will that work if we add that patch on atlas-ranger sandbox?

Do you know how to fetch GUID of all traits/tags?

if there is no way to delete tags using REST API then,can we delete directly data for traits from atlas repository?

if yes then, how can we achieve this?

https://issues.apache.org/jira/browse/ATLAS-136

Re: How to delete apache atlas tag from atlas UI in sandbox?

Guru

@Manoj Dhake

When you create a new Trait/Tag in the UI are are actually creating a new type. When you associate it with an entity you are creating an instance of the Trait as a STRUCT type that only exists in the context of that entity. As you know, you can delete instances of a tag that is assigned to an entity. However, to delete the tag so that it does not show up in Atlas UI you would need to delete the type. At the moment, types cannot be deleted since there may be entities or even other types that are dependent on them. You probably can delete the trait directly from HBase, however, you may also compromise the integrity of the entire Atlas system. You would also have to clear any dependents that are indexed in Solr or graphed in Titan. I am sure these are all issues that the community will have to solve in dealing implemeting the JIRA you referenced. To answer the follow-up question you asked in the comments sections, you can get the instance of a trait only from the entity where the trait is associated as follows:

curl -u admin:admin -X GET http://sandbox.hortonworks.com:21000/api/atlas/entities/fadaca14-7e58-4a2e-b04d-95a3010ce45b/traits

{"requestId":"qtp921483514-312 - bb0f1276-c8fc-499b-ab5d-0e4fde11c796","results":["PII"],"count":1}[root@sandbox ~]#

As you can see, this entity has a tag called PII and it does not have a GUID because it is STRUCT based on the PII type that represents PII trait. You can easily delete the STRUCT that is associated with an entity through the UI or REST api but there is now way to remove the type from which the trait is spawned for the reasons listed above.

View solution in original post