无法删除Apache Atlas分类

时间:2019-05-30 07:27:41

标签: apache-atlas

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

enter image description here

错误:鉴于类型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强制删除单个分类吗?

2 个答案:

答案 0 :(得分:0)

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

&,然后删除附加到typedef的guid

答案 1 :(得分: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'