Tuesday 18 October 2022

Atlas Client: Delete glossary term by id

AtlasClientV2#deleteGlossaryTermByGuid method is used to delete the glossary term.

 

Signature

public void deleteGlossaryTermByGuid(String termGuid) throws AtlasServiceException

 


 

Example

atlasClient.deleteGlossaryTermByGuid(termId);

 

Find the below working application.

 

atlas-application.properties

 

atlas.client.readTimeoutMSecs=30000
atlas.client.connectTimeoutMSecs=30000

 

DeleteTermById.java

package com.sample.app.glossary;

import org.apache.atlas.AtlasClientV2;
import org.apache.atlas.AtlasServiceException;

public class DeleteTermById {
  
  public static void main(String[] args) throws AtlasServiceException {
    AtlasClientV2 atlasClient = new AtlasClientV2(new String[] { "http://localhost:21000" },
        new String[] { "admin", "admin" });
    
    String termId = "8d0451be-bfe9-497c-aae9-f1892b156c94";
    
    atlasClient.deleteGlossaryTermByGuid(termId);
  }

}

  After ran above application, you can observe that the term (term2) is deleted.

 



  

Previous                                                    Next                                                    Home

No comments:

Post a Comment