Hi team,
Please tell me how to delete all(or one) Glossary Terms on the Glossary tab with Python or GraphQL (code example).
I ran the code below, and got “{‘batchRemoveTerms’: True}” returned.
However, it was not actually deleted from the Glossary tab.
I need your help.
import time
gms_endpoint = "#######"
graph = DataHubGraph(DatahubClientConfig(server=gms_endpoint))
start = time.time()
for i in range(len(df)):
term_urn = "urn:li:glossaryTerm:" + df['공통표준용어명'][i]
mutation = f"""
mutation batchRemoveTerms {{
batchRemoveTerms(
input: {{
termUrns: ["{term_urn}"],
resources: []
}}
)
}}
"""
result = graph.execute_graphql(query=mutation)
print(result)
end = time.time()
print(f"{end - start: .2f} sec")```![attachment](https://files.slack.com/files-pri/TUMKD5EGJ-F05Q8PG8ES0/image.png?t=xoxe-973659184562-6705490291811-6708051934148-dd1595bd5f63266bc09e6166373c7a3c)