Type - Bulk Create
批量创建所有 atlas 类型定义。 请避免重新创建现有类型。
POST {endpoint}/datamap/api/atlas/v2/types/typedefs
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
endpoint
|
path | True |
string (uri) |
请求正文
名称 | 类型 | 说明 |
---|---|---|
businessMetadataDefs |
businessMetadataDefs |
|
classificationDefs |
分类定义的数组。 |
|
entityDefs |
实体定义的数组。 |
|
enumDefs |
枚举定义的数组。 |
|
relationshipDefs |
关系定义的数组。 |
|
structDefs |
结构定义的数组。 |
|
termTemplateDefs |
术语模板定义的数组。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
请求已成功。 |
|
Other Status Codes |
意外的错误响应。 |
安全性
OAuth2Auth
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 | 说明 |
---|---|
https://purview.azure.net/.default |
示例
Type_Bulk |
Type_Bulk |
Type_BulkCreate
示例请求
POST {endpoint}/datamap/api/atlas/v2/types/typedefs
{
"enumDefs": [],
"structDefs": [],
"classificationDefs": [],
"entityDefs": [
{
"name": "azure_sql_server_example",
"superTypes": [
"azure_resource"
],
"typeVersion": "1.0",
"attributeDefs": [
{
"name": "databases",
"typeName": "array<azure_sql_db>",
"cardinality": "SET",
"isIndexable": false,
"isOptional": true,
"isUnique": false
}
]
}
],
"relationshipDefs": []
}
示例响应
{
"enumDefs": [],
"structDefs": [],
"classificationDefs": [],
"entityDefs": [
{
"category": "ENTITY",
"guid": "a47fd902-a564-45f1-aa51-ce9224955881",
"createdBy": "ExampleCreator",
"updatedBy": "ExampleUpdator",
"createTime": 1553672211954,
"updateTime": 1553672211954,
"version": 1,
"name": "azure_sql_server_example",
"description": "azure_sql_server_example",
"typeVersion": "1.0",
"attributeDefs": [
{
"name": "databases",
"typeName": "array<azure_sql_db>",
"isOptional": true,
"cardinality": "SET",
"valuesMinCount": 0,
"valuesMaxCount": 2147483647,
"isUnique": false,
"isIndexable": false,
"includeInNotification": false
}
],
"superTypes": [
"azure_resource"
],
"subTypes": []
}
],
"relationshipDefs": []
}
Type_BulkCreateBusinessMetadataDefs
示例请求
POST {endpoint}/datamap/api/atlas/v2/types/typedefs
{
"enumDefs": [],
"structDefs": [],
"classificationDefs": [],
"entityDefs": [],
"relationshipDefs": [],
"businessMetadataDefs": [
{
"name": "myBizMetadata1",
"description": "",
"attributeDefs": [
{
"name": "bizAttr1",
"typeName": "string",
"isOptional": true,
"cardinality": "SINGLE",
"isUnique": false,
"isIndexable": true,
"options": {
"maxStrLength": "50",
"applicableEntityTypes": "[\"Path\"]"
}
}
]
}
]
}
示例响应
{
"enumDefs": [],
"structDefs": [],
"classificationDefs": [],
"entityDefs": [],
"relationshipDefs": [],
"businessMetadataDefs": [
{
"category": "BUSINESS_METADATA",
"guid": "f26dc6d1-be9c-a0ce-a274-b6388ff6e2eb",
"createdBy": "ServiceAdmin",
"updatedBy": "ServiceAdmin",
"createTime": 1646994112241,
"updateTime": 1646994112241,
"version": 1,
"name": "myBizMetadata1",
"description": "This is my businessMetadata1",
"typeVersion": "1.0",
"lastModifiedTS": "1",
"attributeDefs": [
{
"name": "bizAttr1",
"typeName": "string",
"isOptional": true,
"cardinality": "SINGLE",
"valuesMinCount": 0,
"valuesMaxCount": 1,
"isUnique": false,
"isIndexable": true,
"includeInNotification": false,
"options": {
"applicableEntityTypes": "[\"Path\"]",
"maxStrLength": "50"
}
}
]
}
]
}
定义
名称 | 说明 |
---|---|
Atlas |
捕获结构属性的详细信息的类。 |
Atlas |
捕获结构类型的详细信息的类。 |
Atlas |
捕获分类类型的详细信息的类。 |
Atlas |
捕获约束详细信息的类。 |
Atlas |
捕获实体类型的详细信息的类。 |
Atlas |
捕获枚举类型的详细信息的类。 |
Atlas |
捕获枚举元素的详细信息的类。 |
Atlas |
来自服务的错误响应 |
Atlas |
relationshipEndDef 表示关系的末尾。 关系的末尾由类型、属性名称、基数以及它是否为关系的容器端定义。 |
Atlas |
AtlasRelationshipDef 是定义关系的 TypeDef。 与其他 typeDefs 一样,AtlasRelationshipDef 具有名称。 创建 RelationshipDef 后具有 guid。 名称和 guid 是用于标识 RelationshipDef 的 2 种方法。 RelationshipDefs 有 2 个结束,每个结尾指定基数、EntityDef 类型名称和名称,以及结束是否为容器( 可选)。 RelationshipDefs 可以具有 AttributeDefs - 尽管只允许基元类型。 RelationshipDefs 具有一个 relationshipCategory,它指定所需的 UML 关系类型。应使用 EntityDefs 和 RelationshipDefs 的方式是 EntityDefs 将定义 AttributeDefs,这些 AttributeDefs 不会指定 EntityDef 类型名称作为其类型。 RelationshipDefs 将新属性引入实体实例。 例如 EntityDef A 可能有属性 attr1、attr2、attr3 EntityDef B 可能有属性 attr4,attr5,attr6 RelationshipDef AtoB 可能定义 2 个结束 end1: type A, name attr7 end2: type B, name attr8 创建 EntityDef A 的实例时,它将具有 attribute attr1,attr2,attr3,attr7 当创建 EntityDef B 的实例时,它将具有属性 attr4,attr5,attr6,attr8 这样,relationshipDefs 可以独立于 entityDefs 进行创作,并且可以将关系属性注入实体实例 |
Atlas |
relationshipEndDef 表示关系的末尾。 关系的末尾由类型、属性名称、基数以及它是否为关系的容器端定义。 |
Atlas |
捕获结构类型的详细信息的类。 |
Atlas |
类型的定义。 |
Cardinality |
基数 |
Date |
日期格式。 |
Number |
数字格式。 |
Relationship |
关系类别 |
Rounding |
舍入模式 |
Term |
术语表术语的术语模板定义。 |
Time |
时区信息。 |
Type |
类型类别 |
AtlasAttributeDef
捕获结构属性的详细信息的类。
名称 | 类型 | 说明 |
---|---|---|
cardinality |
单值属性或多值属性。 |
|
constraints |
约束数组。 |
|
defaultValue |
string |
特性的默认值。 |
description |
string |
特性的说明。 |
includeInNotification |
boolean |
确定它是否包含在通知中。 |
isIndexable |
boolean |
确定它是否可编制索引。 |
isOptional |
boolean |
确定它是否为可选。 |
isUnique |
boolean |
确定它是否唯一。 |
name |
string |
属性的名称。 |
options |
object |
属性的选项。 |
typeName |
string |
类型的名称。 |
valuesMaxCount |
integer (int32) |
值的最大计数。 |
valuesMinCount |
integer (int32) |
值的最小计数。 |
AtlasBusinessMetadataDef
捕获结构类型的详细信息的类。
名称 | 类型 | 说明 |
---|---|---|
attributeDefs |
属性定义的数组。 |
|
category |
类别类型的枚举。 |
|
createTime |
integer (int64) |
记录的创建时间。 |
createdBy |
string |
创建记录的用户。 |
dateFormatter |
日期格式。 |
|
description |
string |
类型定义的说明。 |
guid |
string |
类型定义的 GUID。 |
lastModifiedTS |
string |
用于并发控制的 ETag。 |
name |
string |
类型定义的名称。 |
options |
object |
类型定义的选项。 |
serviceType |
string |
服务类型。 |
typeVersion |
string |
类型的版本。 |
updateTime |
integer (int64) |
记录的更新时间。 |
updatedBy |
string |
更新记录的用户。 |
version |
integer (int64) |
记录的版本。 |
AtlasClassificationDef
捕获分类类型的详细信息的类。
名称 | 类型 | 说明 |
---|---|---|
attributeDefs |
属性定义的数组。 |
|
category |
类别类型的枚举。 |
|
createTime |
integer (int64) |
记录的创建时间。 |
createdBy |
string |
创建记录的用户。 |
dateFormatter |
日期格式。 |
|
description |
string |
类型定义的说明。 |
entityTypes |
string[] |
在 classificationDef 中指定 entityType 名称列表可确保只能将分类应用于这些 entityType。 实体类型的任何子类型都继承限制。 任何 classificationDef 子类型都继承父实体类型限制。 任何 classificationDef 子类型都可以通过指定 entityType 的子集来进一步限制父实体类型限制。 如果没有父限制,则为空 entityTypes 列表意味着没有限制。 当存在父限制时,空 entityTypes 列表意味着子类型会选取父级限制。 如果提供了 entityType 列表,其中一个从另一个实体类型继承,则会被拒绝。 这应鼓励更清洁的 classificationsDefs。 |
guid |
string |
类型定义的 GUID。 |
lastModifiedTS |
string |
用于并发控制的 ETag。 |
name |
string |
类型定义的名称。 |
options |
object |
类型定义的选项。 |
serviceType |
string |
服务类型。 |
subTypes |
string[] |
子类型的数组。 |
superTypes |
string[] |
超级类型的数组。 |
typeVersion |
string |
类型的版本。 |
updateTime |
integer (int64) |
记录的更新时间。 |
updatedBy |
string |
更新记录的用户。 |
version |
integer (int64) |
记录的版本。 |
AtlasConstraintDef
捕获约束详细信息的类。
名称 | 类型 | 说明 |
---|---|---|
params |
约束定义的参数。 |
|
type |
string |
约束的类型。 |
AtlasEntityDef
捕获实体类型的详细信息的类。
名称 | 类型 | 说明 |
---|---|---|
attributeDefs |
属性定义的数组。 |
|
category |
类别类型的枚举。 |
|
createTime |
integer (int64) |
记录的创建时间。 |
createdBy |
string |
创建记录的用户。 |
dateFormatter |
日期格式。 |
|
description |
string |
类型定义的说明。 |
guid |
string |
类型定义的 GUID。 |
lastModifiedTS |
string |
用于并发控制的 ETag。 |
name |
string |
类型定义的名称。 |
options |
object |
类型定义的选项。 |
relationshipAttributeDefs |
关系属性数组。 |
|
serviceType |
string |
服务类型。 |
subTypes |
string[] |
子类型的数组。 |
superTypes |
string[] |
超级类型的数组。 |
typeVersion |
string |
类型的版本。 |
updateTime |
integer (int64) |
记录的更新时间。 |
updatedBy |
string |
更新记录的用户。 |
version |
integer (int64) |
记录的版本。 |
AtlasEnumDef
捕获枚举类型的详细信息的类。
名称 | 类型 | 说明 |
---|---|---|
category |
类别类型的枚举。 |
|
createTime |
integer (int64) |
记录的创建时间。 |
createdBy |
string |
创建记录的用户。 |
dateFormatter |
日期格式。 |
|
defaultValue |
string |
默认值。 |
description |
string |
类型定义的说明。 |
elementDefs |
枚举元素定义的数组。 |
|
guid |
string |
类型定义的 GUID。 |
lastModifiedTS |
string |
用于并发控制的 ETag。 |
name |
string |
类型定义的名称。 |
options |
object |
类型定义的选项。 |
serviceType |
string |
服务类型。 |
typeVersion |
string |
类型的版本。 |
updateTime |
integer (int64) |
记录的更新时间。 |
updatedBy |
string |
更新记录的用户。 |
version |
integer (int64) |
记录的版本。 |
AtlasEnumElementDef
捕获枚举元素的详细信息的类。
名称 | 类型 | 说明 |
---|---|---|
description |
string |
枚举元素定义的说明。 |
ordinal |
integer (int32) |
枚举元素定义的序号。 |
value |
string |
枚举元素定义的值。 |
AtlasErrorResponse
来自服务的错误响应
名称 | 类型 | 说明 |
---|---|---|
errorCode |
string |
错误代码。 |
errorMessage |
string |
错误消息。 |
requestId |
string (uuid) |
请求 ID。 |
AtlasRelationshipAttributeDef
relationshipEndDef 表示关系的末尾。 关系的末尾由类型、属性名称、基数以及它是否为关系的容器端定义。
名称 | 类型 | 说明 |
---|---|---|
cardinality |
单值属性或多值属性。 |
|
constraints |
约束数组。 |
|
defaultValue |
string |
特性的默认值。 |
description |
string |
特性的说明。 |
includeInNotification |
boolean |
确定它是否包含在通知中。 |
isIndexable |
boolean |
确定它是否可编制索引。 |
isLegacyAttribute |
boolean |
确定它是否为旧属性。 |
isOptional |
boolean |
确定它是否为可选。 |
isUnique |
boolean |
确定它是否唯一。 |
name |
string |
属性的名称。 |
options |
object |
属性的选项。 |
relationshipTypeName |
string |
关系类型的名称。 |
typeName |
string |
类型的名称。 |
valuesMaxCount |
integer (int32) |
值的最大计数。 |
valuesMinCount |
integer (int32) |
值的最小计数。 |
AtlasRelationshipDef
AtlasRelationshipDef 是定义关系的 TypeDef。 与其他 typeDefs 一样,AtlasRelationshipDef 具有名称。 创建 RelationshipDef 后具有 guid。 名称和 guid 是用于标识 RelationshipDef 的 2 种方法。 RelationshipDefs 有 2 个结束,每个结尾指定基数、EntityDef 类型名称和名称,以及结束是否为容器( 可选)。 RelationshipDefs 可以具有 AttributeDefs - 尽管只允许基元类型。 RelationshipDefs 具有一个 relationshipCategory,它指定所需的 UML 关系类型。应使用 EntityDefs 和 RelationshipDefs 的方式是 EntityDefs 将定义 AttributeDefs,这些 AttributeDefs 不会指定 EntityDef 类型名称作为其类型。 RelationshipDefs 将新属性引入实体实例。 例如 EntityDef A 可能有属性 attr1、attr2、attr3
EntityDef B 可能有属性 attr4,attr5,attr6 RelationshipDef AtoB 可能定义 2 个结束
end1: type A, name attr7 end2: type B, name attr8
创建 EntityDef A 的实例时,它将具有 attribute attr1,attr2,attr3,attr7 当创建 EntityDef B 的实例时,它将具有属性 attr4,attr5,attr6,attr8
这样,relationshipDefs 可以独立于 entityDefs 进行创作,并且可以将关系属性注入实体实例
名称 | 类型 | 说明 |
---|---|---|
attributeDefs |
属性定义的数组。 |
|
category |
类别类型的枚举。 |
|
createTime |
integer (int64) |
记录的创建时间。 |
createdBy |
string |
创建记录的用户。 |
dateFormatter |
日期格式。 |
|
description |
string |
类型定义的说明。 |
endDef1 |
relationshipEndDef 表示关系的末尾。 关系的末尾由类型、属性名称、基数以及它是否为关系的容器端定义。 |
|
endDef2 |
relationshipEndDef 表示关系的末尾。 关系的末尾由类型、属性名称、基数以及它是否为关系的容器端定义。 |
|
guid |
string |
类型定义的 GUID。 |
lastModifiedTS |
string |
用于并发控制的 ETag。 |
name |
string |
类型定义的名称。 |
options |
object |
类型定义的选项。 |
relationshipCategory |
“关系”类别确定围绕包含和生命周期的关系样式。 UML 术语用于值。 ASSOCIATION 是一种没有包含的关系。 COMPOSITION 和 AGGREGATION 是包含关系。 容器及其子级的生命周期存在差异。 在 COMPOSITION 示例中,如果没有容器,子级就不能存在。 对于 AGGREGATION,容器和子级的生命周期是完全独立的。 |
|
relationshipLabel |
string |
关系的标签。 |
serviceType |
string |
服务类型。 |
typeVersion |
string |
类型的版本。 |
updateTime |
integer (int64) |
记录的更新时间。 |
updatedBy |
string |
更新记录的用户。 |
version |
integer (int64) |
记录的版本。 |
AtlasRelationshipEndDef
relationshipEndDef 表示关系的末尾。 关系的末尾由类型、属性名称、基数以及它是否为关系的容器端定义。
名称 | 类型 | 说明 |
---|---|---|
cardinality |
单值属性或多值属性。 |
|
description |
string |
关系结束定义的说明。 |
isContainer |
boolean |
确定它是容器。 |
isLegacyAttribute |
boolean |
确定它是否为旧属性。 |
name |
string |
关系结束定义的名称。 |
type |
string |
关系结束的类型。 |
AtlasStructDef
捕获结构类型的详细信息的类。
名称 | 类型 | 说明 |
---|---|---|
attributeDefs |
属性定义的数组。 |
|
category |
类别类型的枚举。 |
|
createTime |
integer (int64) |
记录的创建时间。 |
createdBy |
string |
创建记录的用户。 |
dateFormatter |
日期格式。 |
|
description |
string |
类型定义的说明。 |
guid |
string |
类型定义的 GUID。 |
lastModifiedTS |
string |
用于并发控制的 ETag。 |
name |
string |
类型定义的名称。 |
options |
object |
类型定义的选项。 |
serviceType |
string |
服务类型。 |
typeVersion |
string |
类型的版本。 |
updateTime |
integer (int64) |
记录的更新时间。 |
updatedBy |
string |
更新记录的用户。 |
version |
integer (int64) |
记录的版本。 |
AtlasTypesDef
类型的定义。
名称 | 类型 | 说明 |
---|---|---|
businessMetadataDefs |
businessMetadataDefs |
|
classificationDefs |
分类定义的数组。 |
|
entityDefs |
实体定义的数组。 |
|
enumDefs |
枚举定义的数组。 |
|
relationshipDefs |
关系定义的数组。 |
|
structDefs |
结构定义的数组。 |
|
termTemplateDefs |
术语模板定义的数组。 |
CardinalityValue
基数
值 | 说明 |
---|---|
LIST |
列表 |
SET |
set |
SINGLE |
单身 |
DateFormat
日期格式。
名称 | 类型 | 说明 |
---|---|---|
availableLocales |
string[] |
可用区域设置的数组。 |
calendar |
number (float) |
日历 |
dateInstance |
日期格式。 |
|
dateTimeInstance |
日期格式。 |
|
instance |
日期格式。 |
|
lenient |
boolean |
确定日期格式的宽大。 |
numberFormat |
数字格式。 |
|
timeInstance |
日期格式。 |
|
timeZone |
时区信息。 |
NumberFormat
数字格式。
名称 | 类型 | 说明 |
---|---|---|
availableLocales |
string[] |
数字格式。 |
currency |
string |
货币。 |
currencyInstance |
数字格式。 |
|
groupingUsed |
boolean |
确定是否使用分组。 |
instance |
数字格式。 |
|
integerInstance |
数字格式。 |
|
maximumFractionDigits |
integer (int32) |
小数位数的最大值。 |
maximumIntegerDigits |
integer (int32) |
整数位数的最大值。 |
minimumFractionDigits |
integer (int32) |
小数位数的最小值。 |
minimumIntegerDigits |
integer (int32) |
整数位数的最小值。 |
numberInstance |
数字格式。 |
|
parseIntegerOnly |
boolean |
确定是否只分析整数。 |
percentInstance |
数字格式。 |
|
roundingMode |
舍入模式的枚举。 |
RelationshipCategory
关系类别
值 | 说明 |
---|---|
AGGREGATION |
集合体 |
ASSOCIATION |
关联 |
COMPOSITION |
组成 |
RoundingMode
舍入模式
值 | 说明 |
---|---|
CEILING |
天花板 |
DOWN |
闭 |
FLOOR |
地板 |
HALF_DOWN |
半下 |
HALF_EVEN |
半偶数 |
HALF_UP |
上半 |
UNNECESSARY |
必要 |
UP |
向上 |
TermTemplateDef
术语表术语的术语模板定义。
名称 | 类型 | 说明 |
---|---|---|
attributeDefs |
属性定义的数组。 |
|
category |
类别类型的枚举。 |
|
createTime |
integer (int64) |
记录的创建时间。 |
createdBy |
string |
创建记录的用户。 |
dateFormatter |
日期格式。 |
|
description |
string |
类型定义的说明。 |
guid |
string |
类型定义的 GUID。 |
lastModifiedTS |
string |
用于并发控制的 ETag。 |
name |
string |
类型定义的名称。 |
options |
object |
类型定义的选项。 |
serviceType |
string |
服务类型。 |
typeVersion |
string |
类型的版本。 |
updateTime |
integer (int64) |
记录的更新时间。 |
updatedBy |
string |
更新记录的用户。 |
version |
integer (int64) |
记录的版本。 |
TimeZone
时区信息。
名称 | 类型 | 说明 |
---|---|---|
availableIds |
string[] |
可用 ID 数组。 |
default |
时区信息。 |
|
displayName |
string |
时区的显示名称。 |
dstSavings |
integer (int32) |
夏令时的值。 |
id |
string |
时区的 ID。 |
rawOffset |
integer (int32) |
时区的原始偏移量。 |
TypeCategory
类型类别
值 | 说明 |
---|---|
ARRAY |
数组 |
CLASSIFICATION |
分类 |
ENTITY |
实体 |
ENUM |
枚举 |
MAP |
地图 |
OBJECT_ID_TYPE |
对象 ID 类型 |
PRIMITIVE |
原始 |
RELATIONSHIP |
关系 |
STRUCT |
结构 |
TERM_TEMPLATE |
术语模板 |