0

我有 Apache Atlas 中的分类和子分类列表。想要删除它们并创建一个新列表。所有其他分类都将被删除,但其中一个名为“PII”的分类在我们选择删除分类时会出现以下错误。

在此处输入图像描述

错误:给定类型 PII 有引用

当我们使用以下 URL 通过 Rest API 进行搜索时: http://ip.of.atlas:21000/api/atlas/v2/search/basic?classification=PII

以下结果来了:

{
    "queryType": "BASIC",
    "searchParameters": {
        "classification": "PII",
        "excludeDeletedEntities": false,
        "includeClassificationAttributes": false,
        "includeSubTypes": true,
        "includeSubClassifications": true,
        "limit": 100,
        "offset": 0
    },
    "entities": [
        {
            "typeName": "hive_table",
            "attributes": {
                "owner": "nifi",
                "createTime": 1557832055000,
                "qualifiedName": "demo.test_table@demopilot",
                "name": "test_table"
            },
            "guid": "ecb7bb24-bdde-448c-b718-07273e5ce572",
            "status": "DELETED",
            "displayText": "test_table",
            "classificationNames": [
                "PII"
            ],
            "meaningNames": [],
            "meanings": []
        },
        {
            "typeName": "hive_table",
            "attributes": {
                "owner": "nifi",
                "createTime": 1557832055000,
                "qualifiedName": "demo.test_table@demopilot",
                "name": "test_table"
            },
            "guid": "ed5a9284-c290-4431-ab76-27b820478e29",
            "status": "DELETED",
            "displayText": "test_table",
            "classificationNames": [
                "PII"
            ],
            "meaningNames": [],
            "meanings": []
        },
        {
            "typeName": "hive_column",
            "attributes": {
                "owner": "nifi",
                "qualifiedName": "demo.test_table.traffic_case@demopilot",
                "name": "traffic_case"
            },
            "guid": "73f75a6c-9f4e-41f0-b0ef-6c05ca132639",
            "status": "DELETED",
            "displayText": "traffic_case",
            "classificationNames": [
                "PII"
            ],
            "meaningNames": [],
            "meanings": []
        }
    ]
}

问题: 1. 是否有 API 可以帮助删除所有分类,无论它们是否附加到实体?2. 使用分类名称或 GUID 强行删除单个分类?

4

2 回答 2

0

在 GET 请求下运行: http://ip.of.atlas:21000/api/atlas/v2/types/typedefs

& 然后删除附加到 typedefs 的 guid

于 2019-05-30T09:30:33.203 回答
0

我对其进行了测试,您可以使用以下 API 删除标签:

curl -k -X DELETE --insecure --negotiate -u :  --header \
''{"classificationDefs":[{"name":"PII","superTypes":[],"attributeDefs":[]}]}' \
'https://atlas-host:21443/api/atlas/v2/types/typedefs?type=classification'
于 2019-12-11T10:21:07.417 回答