자습서: Atlas 2.2 새로운 기능

이 자습서에서는 Microsoft Purview의 데이터 맵을 사용하여 새 Atlas 2.2 API와 프로그래밍 방식으로 상호 작용하는 방법을 알아봅니다.

필수 구성 요소

비즈니스 메타데이터 API

비즈니스 메타데이터는 사용자 지정 특성(키 값)을 포함하는 템플릿입니다. 이러한 특성을 전역적으로 만든 다음 여러 형식 정의에 적용할 수 있습니다.

아틀라스 엔드포인트

모든 요청에 대해 Microsoft Purview 계정에 대한 Atlas 엔드포인트가 필요합니다.

  1. Azure Portal Microsoft Purview 계정 찾기
  2. 왼쪽 메뉴에서 속성 페이지를 선택합니다.
  3. Atlas 엔드포인트 값 복사

Atlas 엔드포인트 상자가 강조 표시된 Microsoft Purview의 속성 페이지 스크린샷

특성을 사용하여 비즈니스 메타데이터 만들기

다음 엔드포인트에 POST 요청을 보낼 수 있습니다.

POST {{endpoint}}/api/atlas/v2/types/typedefs

applicableEntityTypes 속성은 메타데이터가 적용될 데이터 형식을 알려줍니다.

샘플 JSON:

   {
  "businessMetadataDefs": [
    {
      "category": "BUSINESS_METADATA",
      "createdBy": "admin",
      "updatedBy": "admin",
      "version": 1,
      "typeVersion": "1.1",
      "name": "<Name of Business Metadata>",
      "description": "",
      "attributeDefs": [
        {
          "name": "<Attribute Name>",
          "typeName": "string",
          "isOptional": true,
          "cardinality": "SINGLE",
          "isUnique": false,
          "isIndexable": true,
          "options": {
            "maxStrLength": "50",
            "applicableEntityTypes": "[\"Referenceable\"]"
          }          
        }
      ]
    }
  ]
}

기존 비즈니스 메타데이터에 특성 추가 또는 업데이트

다음 엔드포인트에 PUT 요청을 보낼 수 있습니다.

PUT {{endpoint}}/api/atlas/v2/types/typedefs

샘플 JSON:

   {
  "businessMetadataDefs": [
    {
      "category": "BUSINESS_METADATA",
      "createdBy": "admin",
      "updatedBy": "admin",
      "version": 1,
      "typeVersion": "1.1",
      "name": "<Name of Business Metadata>",
      "description": "",
      "attributeDefs": [
        {
          "name": "<Attribute Name>",
          "typeName": "string",
          "isOptional": true,
          "cardinality": "SINGLE",
          "isUnique": false,
          "isIndexable": true,
          "options": {
            "maxStrLength": "500",
            "applicableEntityTypes": "[\"Referenceable\"]"
          }          
        },
        {
          "name": "<Attribute Name 2>",
          "typeName": "int",
          "isOptional": true,
          "cardinality": "SINGLE",
          "isUnique": false,
          "isIndexable": true,
          "options": {
            "applicableEntityTypes": "[\"Referenceable\"]"
          }          
        }
      ]
    }
  ]
}

비즈니스 메타데이터 정의 가져오기

다음 엔드포인트에 GET 요청을 보낼 수 있습니다.

GET {endpoint}}/api/atlas/v2/types/typedef/name/{{Business Metadata Name}}

비즈니스 메타데이터 특성을 엔터티로 설정

다음 엔드포인트에 POST 요청을 보낼 수 있습니다.

POST {{endpoint}}/api/atlas/v2/entity/guid/{{GUID}}/businessmetadata?isOverwrite=true

샘플 JSON:

{
  "myBizMetaData1": {
        "bizAttr1": "I am myBizMetaData1.bizAttr1",
        "bizAttr2": 123,
  }
 }

엔터티에서 비즈니스 메타데이터 특성 삭제

다음 엔드포인트에 DELETE 요청을 보낼 수 있습니다.

'DELETE' {{endpoint}}/api/atlas/v2/entity/guid/{{GUID}}/businessmetadata?isOverwrite=true

샘플 JSON:

{
  "myBizMetaData1": {
    "bizAttr1": ""    
  }
}

비즈니스 메타데이터 형식 정의 삭제

참고

카탈로그의 자산에 할당되지 않은 경우 참조가 없는 경우에만 비즈니스 메타데이터 형식 정의를 삭제할 수 있습니다.

다음 엔드포인트에 DELETE 요청을 보낼 수 있습니다.

DELETE {{endpoint}}/api/atlas/v2/types/typedef/name/{{Business Metadata Name}}

사용자 지정 특성 API

사용자 지정 특성은 Atlas 엔터티에 직접 추가할 수 있는 키/값 쌍입니다.

사용자 지정 특성을 엔터티로 설정

다음 엔드포인트에 POST 요청을 보낼 수 있습니다.

POST {{endpoint}}/api/atlas/v2/entity

샘플 JSON:

{
    "entity": {
        "typeName": "azure_datalake_gen2_path",
        "attributes": {
           
            "qualifiedName": "<FQN of the asset>",
            "name": "data6.csv"
        },
        "guid": "3ffb28ff-138f-419e-84ba-348b0165e9e0",
        "customAttributes": {
            "custAttr1": "attr1",
            "custAttr2": "attr2"
        }
    }
}

레이블 API

레이블은 모든 Atlas 엔터티에 적용할 수 있는 자유 텍스트 태그입니다.

레이블을 엔터티로 설정

다음 엔드포인트에 POST 요청을 보낼 수 있습니다.

POST {{endpoint}}/api/atlas/v2/entity/guid/{{GUID}}/labels

샘플 JSON:

[
  "label1",
  "label2"
]

엔터티에 대한 레이블 삭제

다음 엔드포인트에 DELETE 요청을 보낼 수 있습니다.

DELETE {{endpoint}}/api/atlas/v2/entity/guid/{{GUID}}/labels

샘플 JSON:

[
  "label2"
]

다음 단계