此手册用于记录大数据开发与管理平台中,数据地图所有对外开放的OpenAPI,阅读此手册,你将了解数据地图开放的OpenAPI能力与调用方法。

一、数据地图公共参数

1.1 响应格式

名称 类型 描述
code Number 响应码
reqId String 请求ID
cost Number 耗时,单位:ms
msg String 响应消息
result Object 响应结果

1.2 错误码

响应码 说明
-2 系统异常

1.3 枚举列表

1.3.1 SortTypeEnum
枚举值 类型 名称
ASC String 升序
DESC String 降序
1.3.2 LableTypeEnum

搜字段指标类型

枚举值 类型 名称
dimension String 维度
metric String 度量
index String 指标
all String 所有类型
1.3.3 TableDdlTypeEnum

ddl/dml 类型枚举

枚举值 类型 名称
1 Number 新建表
2 Number 新增列
3 Number 修改列
4 Number 新增分区
5 Number 修改分区值
6 Number 删除分区
7 Number 修改分区
8 Number 重命名列
9 Number 重命名表
10 Number 修改表属性
11 Number 删除表
12 Number 修改表位置
13 Number 修改表分区位置
14 Number 修改表备注
15 Number 修改列描述
16 Number 修改表结构
17 Number 读表(SELECT)
18 Number 写表(INSERT)
19 Number 更新表(UPDATE)
20 Number 删除表数据(DELETE)
1.3.4 DataSourceTypeEnum

数据源类型枚举

枚举值 类型 名称
hive String
mysql String
oracle String
greenplum String
hbase String
kudu String
kafka String
rocketmq String
vertica String
1.3.5 TableTypeEnum

表类型枚举

枚举值 类型 名称
external String 外部表
internal String 内部表
view String 视图表
other String 其他
1.3.6 TagTypeEnum

标签类型枚举

枚举值 类型 名称
privilege String 库/表权限
core String 核心
recommend String 推荐
index String 指标
subjectDomain String 主题域
layer String 分层
metric String
dimension String 维度
1.3.7 StatusEnummn
枚举值 类型 名称
CREATE String 创建
RUNNING String 运行
COMPLETE String 完成
ERROR String 错误
1.3.8 LogicDataStatusEnum
枚举值 类型 名称
CREATE String 新建
DRAFT String 草稿
WAITING_PUBLISH String 待发布
PUBLISHED String 已发布

1.4 请求参数列表

1.4.1 基本参数

PageParam

分页参数

字段 类型 描述 是否必填 默认值
pageNum Number 页号 1
pageSize Number 页大小 10
1.4.2 搜索参数
TableSearchParam

搜表参数

字段 类型 描述 是否必填 默认值
pageNum Number 页号 1
pageSize Number 页大小 10
product String 项目名
groupId Number 项目组id
clusterId String 集群id
keyword String 关键字
user String 用户(邮箱)
datasourceType DataSourceTypeEnum 数据源类型
db String 库名
subjectDomain String 主题域
layer String 数仓层级
core Boolean 是否核心表 all
recommend Boolean 是否推荐表 all
sortByReferCount SortTypeEnum 根据引用热度排序
sortByReadCount SortTypeEnum 根据读取热度排序
TopicSearchParam

搜topic参数

字段 类型 描述 是否必填 默认值
pageNum Number 页号 1
pageSize Number 页大小 10
keyword String 关键字
datasourceName Number 数据源名称
product String 项目名称
ColumnSearchParam

搜字段参数

字段 类型 描述 是否必填 默认值
pageNum Number 页号 1
pageSize Number 页大小 10
keyword String 关键字
product String 项目名称
clusterId String 集群id
datasourceType String 数据源名称
db String 库名
tagType LableTypeEnum 字段标签类型
IndexSearchParam

搜指标参数

字段 类型 描述 是否必填 默认值
pageNum Number 页号 1
pageSize Number 页大小 10
keyword String 关键字
product String 项目名称
clusterId String 集群id
groupId String 项目组id
firIndexDomain String 一级指标域id
secIndexDomain String 二级指标域id
indexType String 指标类型
indexCore String 核心指标类型
1.4.3 表信息参数
TableParam

表详情参数

字段 类型 描述 是否必填 默认值
datasourceId Long 数据源id
db String 表属库名
table String 表名
product String 项目名称
clusterId String 集群id
user String 用户邮箱
TablePreviewParam

表预览参数

字段 类型 描述 是否必填 默认值
datasourceId Long 数据源id
db String 表属库名
table String 表名
product String 项目名称
clusterId String 集群id
user String 用户邮箱
1.4.4 数仓查询参数
SubjectTableParam

主题域表筛选参数

字段 类型 描述 是否必填 默认值
pageNum Number 页号 1
pageSize Number 页大小 10
product String 项目名称
clusterId String 集群id
tableTypes
List<String> 数据源类型 ["Hive","Vertica","Mysql"]
table String 表名
subjectId Number 主题域id
layerId Number 分层id

1.5 响应实体列表

1.5.1 基础实体
PageResult
字段 类型 描述
pageSize Number 每页显示条数
pageNum Number 页号
totalCount Number 总条数
list Array<Object> 当前页结果
UserSimple
字段 类型 描述
user String 邮箱
fullName String 名字
1.5.2 搜索
Table

搜索接口表信息

字段 类型 描述
product String 项目名称
db String 库名
table String 表名
datasourceType String 数据源类型
datasourceName String 数据源名称
fullName String 用户名
comment String 描述
partition Boolean 是否分区表
partitionLifeCycle String 分区生命周期
tableLifeCycle String 表生命周期
core Boolean 是否核心表
recommend Boolean 是否推荐表
layer String 数仓层级
subjectDomain List<String> 主题域
referCount Number 引用热度
readCount Number 读取热度
MappingTable

流表

字段 类型 描述
mappingDb String 流表所属库名
mappingTable String 流表名称
Topic

topic信息

字段 类型 描述
product String 项目名称
db String 库名
resource String topic名称
datasourceType String 数据源类型
datasourceName String 数据源名称
datasourceId Number 数据源id
mappingTableInfos List<MappingTable> 映射流表
TableFieldSimple

字段信息

字段 类型 描述
name String 列名
comment String 描述
primaryKey Boolean 是否主键
tags List<TagInfoSimple> 列标签
TableAndColumnInfo

列搜索信息

字段 类型 描述
product String 项目名称
db String 库名
table String 表名
datasourceType String 数据源类型
datasourceName String 数据源名称
user String 邮箱
comment String 描述
layer String 数仓层级
subjectDomain List<String> 主题域
field TableFieldSimple 字段详情
MappingField
字段 类型 描述
db String 库名
table String 表名
fieldName String 字段名
1.5.2 表信息
TableDetail
字段 类型 描述
db String 库名
table String 表物理名称
groupId Number 项目组id
groupName String 项目组名称
productId Number 项目id
product String 项目名称
clusterId String 集群id
clusterName String 集群名称
owner UserSimple 负责人
comment String 表描述
primaryKeys List<String> 主键列表
datasourceType String 数据源类型
tableType TableTypeEnum 表类型
collectCount Number 收藏热度
referCount Number 引用热度
readCount Number 读取热度
searchCount Number 搜索热度
collectCount Number 收藏热度
storageInfo TableStorage 表存储信息
businessInfo TableBusiness 表业务信息
indexs List<TagInfoSimple> 表关联指标
datasourceId Number 数据源id
detailPath String 表详情路径
TableBusiness

表业务信息

字段 类型 描述
subjectDomain List<String> 主题域
layer String 数仓层级
levelRelType List<LableTypeEnum> 标准化标签类型
impalaSync Boolean 是否impala同步
recommend Boolean 是否推荐表
core Boolean 是否核心表
hasCollected Boolean 是否已收藏
auditMonitorNum Number 稽核分数
verticaTableMeta VerticaTableMeta vertica 元数据信息
VerticaTableMeta

vertica相关元信息

字段 类型 描述
schemaName String schema名称
tableName String 表名
loadMethod String 加载方式
ksafe Number 复制数量
orderByFields List<String> 排序字段
segmentation Boolean 是否分段
segmentationFields List<String> 分段字段
TagInfoSimple
字段 类型 描述
id Number 指标id
name String 指标名
abbr String 英文名
type TagTypeEnum tag类型
TagInfo
字段 类型 描述
tag String tag
type String 类型
keywords List<String> 关键词
id String id
bizId Number 项目组id
TableStorage
字段 类型 描述
totalSize String 表容量(已按照B、KB、MB等转换)
filesNumber Integer 表文件数
storageType String 表存储方式
serializationType String 表序列化格式
location String 表位置
createTime String 表创建时间
updateTime String 表更新时间
partition Boolean 是否分区表
partitionLifeCycle String 分区生命周期
tableLifeCycle String 表生命周期
deleteDir Boolean 外部表删除策略中是否删除目录文件
TableField
字段 类型 描述
id Number 列ID
name String 列名
type String 列类型
comment String 列描述
enumKey Boolean 是否枚举字段
enumContent String 枚举值
partitionKey Boolean 是否分区字段
caliber String 字段口径
primaryKey Boolean 是否是主键
labelType TagTypeEnum 标准化标签类型
labelValues List<TagInfoSimple> 标准化标签值
TableFields
字段 类型 描述
primaryKeys List<String> 主键
total Number 字段数量
indexs List<TagInfoSimple> 表上关联指标
fields List<TableField> 字段列表
TablePrevData

预览结果

字段 类型 描述
partname String 分区名称
columns List<String> 列名
columnTypes List<String> 数据类型
datas List<List<String>> 数据信息
TableDdl

ddl/dml信息

字段 类型 描述
modifiedTime String 修改时间
type TableDdlTypeEnum 操作类型
execSql String sql
operator UserSimple 操作人
LogicColumnInfo
字段 类型 描述
columnIdCode String 列id
tableIdCode String 表id
rawDict List<TagInfo> 原始字典
dataElement Lis<TagInfo> 数据元
engFullName String 英文全称
columnName String 字段名
columnCnName String 字段中文名
businessDefine String 业务
primaryKey Boolean 是否主键
securityLevel List<TagInfo> 安全等级
dataClassification String 数据类别
columnType String 字段类型
columnSize String 字段size
columnPrecision String 字段precision
columnFormat String 字段格式
unit String 度量单位
valueRange String 范围
standardDict List<TagInfo> 标准字典信息
dqInfo List<TagInfo> 质量信息
note String 备注
groupId Number 项目组ID
logicLabelInfos List<TagInfo> 关联标签 type为logicLabel
logicIndexInfos List<TagInfo> 关联指标 type为logicIndex
LogicColumnInfoV2
字段 类型 描述
columnIdCode String 列id
tableIdCode String 表id
rawDict List<TagInfo> 原始字典
dataElement List<TagInfo> 数据元
engFullName String 英文全称
columnName String 字段名
columnCnName String 字段中文名
businessDefine String 业务
primaryKey Boolean 是否主键
securityLevel String 安全等级
dataClassification String 数据类别
columnType String 字段类型
columnSize String 字段size
columnPrecision String 字段precision
columnFormat String 字段格式
unit String 度量单位
valueRange String 范围
standardDict List<TagInfo> 标准字典信息
dqInfo List<TagInfo> 质量信息
note String 备注
groupId Number 项目组ID
logicLabelInfos List<TagInfo> 关联标签 type为logicLabel
logicIndexInfos List<TagInfo> 关联指标 type为logicIndex
customFields Map<String,Object> 自定义字段
LogicColumnInfoV3
字段 类型 描述
columnName String 字段名
securityLevel String 安全等级
customFields Map<String,Object> 自定义字段
LogicTable

逻辑表详情

字段 类型 描述
tableIdCode String 表编码
tableName String 表物理名称
tableCnName String 表中文名称
dbName String 库/Schema
domain List<TagInfo> 主题域
createTableDdl String 建表语句
layerTag List<TagInfo> 所属分层
storageType String 存储方式
serializationFormat String 序列化格式
tableQualityScore String 表质量平均分
securityLevel String 表安全等级
storageSize String 存储大小
storagePath String 存储路径
partitionInfo String 分区信息
registrant String 注册人
metaDataStatus String 元数据状态
updateRecord String 更新记录
registerTime String 注册时间
invalidTime String 失效时间
updateTime Number 更新时间
businessDesc String 业务描述
note String 备注
assetCatalog Map<String,List<TagInfo>> 资产目录
dataSourceName String 数据源名称
dataSourceType String 数据源类型
dataSourceCluster String 所属集群
columnInfos List<LogicColumnInfo> 字段信息
groupId Number 项目组id
logicLabelInfos List<TagInfo> 标签信息
logicIndexInfos List<TagInfo> 指标信息
customFields Map<String, Object> 自定义字段
techPrincipal KeyValueDto 技术负责人
businessPrincipal KeyValueDto 业务负责人
LogicTableV2
字段 类型 描述
tableIdCode String 表编码
table String 表物理名称
tableCnName String 表中文名称
tableEngFullName String 表英文全称
db String 库/Schema
domain List<TagInfo> 主题域
createTableDdl String 建表语句
layerTag List<TagInfo> 所属分层
storageType String 存储方式
serializationFormat String 序列化格式
tableQualityScore String 表质量平均分
securityLevel String 表安全等级
storageSize String 存储大小
storagePath String 存储路径
partitionInfo String 分区信息
registrant String 注册人
metaDataStatus String 元数据状态
updateRecord String 更新记录
registerTime String 注册时间
invalidTime String 失效时间
updateTime Number 更新时间
businessDesc String 业务描述
note String 备注
assetCatalog Map<String,List<TagInfo>> 资产目录
customzieAssetCatalog Map<String,List<TagInfo>> 自定义资产目录
datasourceName String 数据源名称
datasourceType String 数据源类型
datasourceId Number 数据源Id
clusterId String 所属集群
product String 所属项目信息(hive)
columnInfos List<LogicColumnInfo> 字段信息
groupId Number 项目组id
customFields Map<String, Object> 自定义字段
techPrincipal UserSimple 技术负责人
businessPrincipal UserSimple 业务负责人
dataBA UserSimple 数据BA
version Integer 版本
department String 主管部门
updateStrategy String PUT_IF_ABSENT(填充字段null值,有值跳过)
UPSERT(查到表则
更新指定字段值,查不到表则新增)
url String 标识数据源的URL
type String hive 数据源类型小写
user String 数据源对应的user
KeyValueDto
字段 类型 描述
key Object
value Object
AssetDetail

资产详细信息

字段 类型 描述
logicTable LogicTable 逻辑表信息
tableDetail TableDetail 物理表信息
fieldInfo TableFields 字段信息
previewInfo TablePrevData 预览记录
ddlList List<TableDdl> ddl记录
dmlList List<TableDdl> dml记录
AssetPageResult
字段 类型 描述
pageSize Number 每页显示条数
pageNum Number 页号
totalCount Number 总条数
list Array<Object> 结果列表(根据入参searchType不同,Object类型也不同,见备注)
aggregations Map<String,Object> 聚集信息包含(目录树等)
根据入参searchType不同,map也不同
map的key可能为table index 和tag,对应的value聚集信息的Object为TableAggregation, IndexAggregation, TagAggregation
tableTotalCount Number 表数量
indexTotalCount Number 指标数量
tagTotalCount Number 标签数量

备注:

searchTypetable时,AssetPageResult中的当前页结果Object定义为 TableItem

searchTypeindex时,AssetPageResult中的当前页结果Object定义为 IndexItem

searchTypetag时,AssetPageResult中的当前页结果Object定义为 TagItem

searchTypeall时,AssetPageResult中的当前页结果Object为TableItem IndexItem TagItem三种

AssetPageResultV2
字段 类型 描述
pageSize Number 每页显示条数
pageNum Number 页号
totalCount Number 总条数
list Array<Object> 当前页结果
aggregations Map<String,Object> 聚集信息包含(目录树等)
map的key可能为table index 和tag,对应的value聚集信息的Object为List<AssetCatalogItem>, IndexAggregation, TagAggregation
tableTotalCount Number 表数量
indexTotalCount Number 指标数量
tagTotalCount Number 标签数量

searchTypetable时,AssetPageResult中的当前页结果Object定义为 TableItemV2

searchTypeindex时,AssetPageResult中的当前页结果Object定义为 IndexItem

searchTypetag时,AssetPageResult中的当前页结果Object定义为 TagItem

TableItem
字段 类型 描述 字段来源
datasourceType String 数据源类型 物理表
datasourceTypeAlias String 数据源类型别名 物理表
datasourceName String 数据源 物理表
catalogName String catalog名称 物理表
accountName String 表属项目名 物理表
accountId Number 项目id 物理表
clusterId String 所属集群 物理表
databaseName String 库/schema 物理表
tableName String 表物理名称 物理表
owner String 表负责人 物理表
description String 备注 物理表
partitioned Boolean 是否分区表 物理表
partitionLifeCycle String 分区生命周期 物理表
tableLifeCycle String 表生命周期 物理表
tablecore Boolean 是否核心表 物理表
recommendTable Boolean 是否推荐表 物理表
level String 所属分层 物理表
domain List<String> 主题域 物理表
referCount Number 引用热度 物理表
readCount Number 读取热度 物理表
collectCount Number 收藏热度 物理表
searchCount Number 搜索热度 物理表
hasBrowsed Boolean 近7天浏览过 物理表
searchType String 搜索类型(table)
assetCatalog List<AssetCatalogSimple> 资产目录 逻辑表
customizeAssetCatalog List<AssetCatalogSimple> 自定义目录 逻辑表
tableQualityScore String 表质量平均分 逻辑表
tableCnName String 表中文名称 逻辑表
tableIdCode String 表编码 逻辑表
securityLevel String 表安全等级 逻辑表
TableItemV2
字段 类型 描述
catalogName String 元数据中心catalog名称
databaseName String 所属db
tableName String 表名
description String 描述
owner String 负责人
tableIdCode String 表编码
tableCnName String 中文名称
securityLevel String 安全等级
tableQualityScore String 质量分
assetCatalog List<AssetCatalogSimple> 标准目录
customAssetCatalog List<AssetCatalogSimple> 自定义目录
datasourceName String 数据源名称
department String 主管部门
businessPrincipal UserSimple 业务负责人
techPrincipal UserSimple 技术负责人
registrant UserSimple 创建人
IndexItem
字段 类型 描述
id String 指标id
name String 指标名称
physicalName String 指标物理名称
identifier String 指标标识
type String 指标类型
domainName String 指标域
core Boolean 是否核心指标
bizCaliber String 业务口径
bizCaliberReporter UserSimple 业务负责人
creator UserSimple 创建人
address String 跳转指标系统的地址
searchType String 搜索类型(index)
qualityScore String 质量分
assetCatalog List<AssetCatalogSimple> 资产目录
techCaliberReporter UserSimple 技术负责人
department String 部门
securityLevel String 安全等级
TagItem
字段 类型 描述
objId Number 模型id
tagUid String 标签唯一id
name String 标签名称
tagEnName String 标签标识(一般是英文名称)
description String 标签描述
tagType String 标签类型
creator String 创建人
createTime String 创建时间
searchType String 搜索类型(tag)
qualityScore String 质量分
assetCatalog List<AssetCatalogSimple> 资产目录
customAssetCatalog List<AssetCatalogSimple> 自定义目录
creatorDto UserSimple 创建人
technicalDirector UserSimple 技术负责人
businessOwner UserSimple 业务负责人
mappingField MappingField 映射字段
department String 部门
securityLevel String 安全等级
TagAggregation
字段 类型 描述
tagType List< TreeAggItem > 标签类型
assetCatalog List<AssetCatalogItem> 资产目录
IndexAggregation
字段 类型 描述
indexType List<IndexAggItem> 指标类型
indexDomain List<TreeAggItem> 指标域
assetCatalog List<AssetCatalogItem> 资产目录
TableAggregation
字段 类型 描述
assetCatalog List<AssetCatalogItem> 资产目录
dataSourceType List<TagInfoAggItem> 数据源类型
database List<TagInfoAggItem> 数据库
accounts List<TagInfoAggItem> 项目
level List<TagInfoAggItem> 分层
domain List<TagInfoAggItem> 主题域
core List<TagInfoAggItem> 核心表
recommend List<TagInfoAggItem> 推荐表
dim List<TagInfoAggItem> 维度
metric List<TagInfoAggItem> 度量
index List<TagInfoAggItem> 指标
TagInfoAggItem
字段 类型 描述
tag String 标签名
tagAliasName String 标签别名
count Number 数量
AssetCatalogItem
字段 类型 描述
name String 目录名
count Number 数目
identifier String 资产目录编码,目录id
catalogType Number 0:标准目录 1:自定义目录
children List<AssetCatalogItem> 子节点
IndexAggItem
字段 类型 描述
tag String 标签名
tagAliasName String 标签别名
count Number 数量
TreeAggItem
字段 类型 描述
tag String 标签类型id
tagAliasName String 标签类型中文名称
count Number 数量
childrenAggregation List<TreeAggItem> 子节点
UserSimple
字段 类型 描述
email String 邮箱
fullName String 姓名
SubTableUrl
字段 类型 描述
tableName String 表名
url String url
RelateTable
字段 类型 描述
catalogName String catalog名
databaseName String 库名
tableName String 表名
resource Boolean 资源信息
dimensions List<Dimension> 关联维度
Dimension
字段 类型 描述
id Number id
name String 名称
abbr String 属性
subjectId Number 主题id
subjectName String 主题名称
description String 描述
mainTable String 主表
subTable List<String> 子表
owner String 表负责人email
ownerName String 表负责人名称
modifier String 修改人email
modifierName String 修改人名称
pgId Number 项目组id
clusterId String 集群id
createTime String 创建时间
updateTime String 更新时间
mainTableUrl String 主表url
subTableUrls List<SubTableUrl> 子表url
quote Boolean 是否引用
subjectOwners List<String> 主题负责人
subSubjectId Number 子主题id
subSubjectName String 子主题name
AssetCatalogSimple
identifier String 目录标识
name String 根目录
fullPath String 子主题name
1.5.3 数仓
WarehouseTable

数仓表信息

字段 类型 描述
db String 库名
table String 表名
tableOwner UserSimple 表负责人
comment String 描述
primaryKeys List<String> 主键
layer String 表分层
subjectFullName List<String> 主题归属/所有末级主题节点
clusterId String 集群id
recommend Boolean 是否推荐
core Boolean 是否核心
Subject

主题域信息

字段 类型 描述
id Number 自增id
parentId Number 父主题id
name String 主题名
abbr String 主题缩写
description String 主题描述
level Number 主题层级
sort Number 顺序
presetFlag Number 1:预置;0:未预置
creator UserSimple 创建人
modifier UserSimple 修改人
fullName String 全路径名
fullId String 全路径id
groupId Number 项目组id
clusterId String 集群Id
currentOwners Set<UserSimple> 用户有该主题的当前用户
owners Set<UserSimple> owners 拥有该主题的所有用户
children List<Subject> 主题子节点

二、OpenAPI列表

OpenAPI总览

模块名称支持版本状态请求方法请求路径
搜索


搜表v1.5.2已上线POST/table/v1/search
搜topicv1.5.2已上线POST/topic/v1/search
搜字段v1.5.2已上线POST/column/v1/search
表信息
表详情v1.5.2已上线POST/table/v1/info/get
字段信息v1.5.2已上线POST/field/v1/info/get
hive数据预览v1.5.2已上线POST/table/v1/data/preview
dml记录v1.5.2已上线GET/table/v1/dml/get
数仓导引
数仓表筛选v1.5.2已上线POST/subject/v1/table/list
主题列表v1.5.2已上线GET/subject/v1/list
数据治理资产搜索v2.0.0已上线POST/asset/v2/search
资产详情v2.0.0已上线GET/table/v2/search
excel导入v2.0.0已上线GET/excel/import

2.1 搜索OpenAPI

2.1.1 表搜索

POST /table/v1/search

产品版本:v1.5.2

描述:根据表名搜表

URL参数/请求体

见: TableSearchParam

请求示例:

{

"keyword": "test",

"pageSize": 3,

"pageNum": 1,

"clusterId": "dev4",

"product": "intern",

"searchType":"table",

"core":true

}

响应体

名称 类型 描述 必传 默认值
code Number 状态码
msg String 错误信息
cost Number 接口消耗毫秒数
reqId String 请求ID
result PageResult<Table> 搜索结果

响应示例:

{

"code": 0,

"action": 0,

"msg": "success",

"result": {

    "pageNum": 1,

    "pageSize": 3,

    "totalCount": 20,

    "totalPage": 7,

    "list": \[

        {

            "product": "intern",

            "db": "streamdb\_test",

            "table": "test\_test\_test",

            "datasourceType": "hive",

            "datasourceName": "dev4-hive",

            "fullName": "杨正伟",

            "comment": "测试1对对对11ww",

            "partition": false,

            "partitionLifeCycle": "永久",

            "tableLifeCycle": "永久",

            "core": true,

            "recommend": false,

            "layer": "openkeytab",

            "subjectDomain": \[

                "ZmTest",

                "主题审批人"

            \],

            "referCount": 0,

            "readCount": 0

        },

        {

            "product": "intern",

            "db": "dev",

            "table": "dwd\_test\_test\_test11\_p\_haha",

            "datasourceType": "hive",

            "datasourceName": "dev4-hive",

            "fullName": "mammut\_test",

            "comment": "",

            "partition": false,

            "partitionLifeCycle": "",

            "tableLifeCycle": "",

            "core": true,

            "layer": "-",

            "subjectDomain": \[\],

            "referCount": 0,

            "readCount": 0

        },

        {

            "product": "intern",

            "db": "dev",

            "table": "ads\_test\_human\_approve\_test3",

            "datasourceType": "hive",

            "datasourceName": "dev4-hive",

            "fullName": "徐臻",

            "comment": "审批人包含自己",

            "partition": false,

            "partitionLifeCycle": "永久",

            "tableLifeCycle": "永久",

            "core": true,

            "layer": "dim",

            "subjectDomain": \[

                "物流"

            \],

            "referCount": 0,

            "readCount": 0

        }

    \]

},

"reqId": "a85e8be8d03944289ad6fcd21ab54161",

"cost": 610

}

2.1.2 搜topic

POST /topic/v1/search

产品版本:v1.5.2

描述:根据topic名或前缀搜topic

URL参数/请求体

见: TopicSearchParam

请求示例:

{

"pageNum": 1,

"pageSize": 2,

"product": "intern",

"keyword": "test"

}

响应体

名称 类型 描述 必传 默认值
code Number 状态码
msg String 错误信息
cost Number 接口消耗毫秒数
reqId String 请求ID
result PageResult<Topic> 搜索结果

{

"code": 0,

"action": 0,

"msg": "success",

"result": {

    "pageNum": 1,

    "pageSize": 2,

    "totalCount": 7,

    "totalPage": 4,

    "list": \[

        {

            "db": "mem",

            "resource": "test",

            "product": "intern",

            "datasourceType": "kafka",

            "datasourceName": "kafka\_ndi\_dev1",

            "datasourceId": 1500,

            "mappingTableInfos": \[\]

        },

        {

            "db": "mem",

            "resource": "test",

            "product": "intern",

            "datasourceType": "kafka",

            "datasourceName": "ndi\_kafka\_dev",

            "datasourceId": 2605,

            "mappingTableInfos": \[\]

        }

    \]

},

"reqId": "b6442748c96944088a38b64ab61e01fc",

"cost": 63

}

2.1.3 搜字段

POST /column/v1/search

产品版本:v1.5.2

描述:根据列名搜列

URL参数/请求体

见: ColumnSearchParam

请求示例:

{

"keyword": "test",

"pageSize": 3,

"pageNum": 1,

"product": "intern",

"tagType":"dimension"

}

响应体

名称 类型 描述 必传 默认值
code Number 状态码
msg String 错误信息
cost Number 接口消耗毫秒数
reqId String 请求ID
result PageResult<TableAndColumnInfo> 搜索结果

{

"code": 0,

"action": 0,

"msg": "success",

"result": {

    "pageNum": 1,

    "pageSize": 3,

    "totalCount": 6,

    "totalPage": 2,

    "list": \[

        {

            "datasourceType": "mysql",

            "datasourceName": "dqc-local-enable",

            "product": "intern",

            "db": "DQC",

            "table": "dmap\_mysql\_0120\_1",

            "fullName": "徐臻",

            "comment": "-",

            "layer": "appendctest",

            "subjectDomain": \[

                "xuzhen"

            \],

            "field": {

                "name": "id",

                "comment": "test3",

                "tags": \[

                    {

                        "name": "test3",

                        "type": "dim"

                    }

                \]

            }

        },

        {

            "datasourceType": "greenplum",

            "datasourceName": "mh-test12",

            "product": "intern",

            "db": "public",

            "table": "gp\_0214\_1",

            "fullName": "徐臻",

            "comment": "-",

            "layer": "dwd",

            "subjectDomain": \[

                "xuzhen"

            \],

            "field": {

                "name": "id",

                "comment": "test5",

                "tags": \[

                    {

                        "name": "test5",

                        "type": "dim"

                    }

                \]

            }

        },

        {

            "datasourceType": "greenplum",

            "datasourceName": "浪潮MPP",

            "product": "intern",

            "db": "public",

            "table": "cwztesttags4",

            "fullName": "-",

            "comment": "-",

            "layer": "capturetest",

            "subjectDomain": \[

                "陈炜昭测试2",

                "子维度2"

            \],

            "field": {

                "name": "b",

                "comment": "test3",

                "tags": \[

                    {

                        "name": "test3",

                        "type": "dim"

                    }

                \]

            }

        }

    \]

},

"reqId": "97f0aecd3b854d3096a2d985a3c07650",

"cost": 1308

}

2.2 表信息OpenAPI

2.2.1 表详情

POST /table/v1/info/get

产品版本:v1.5.2

描述:按条件搜表,返回单个表详情

URL参数/请求体

请求:见 TableParam

请求示例:

{

"datasourceId": 1031,

"db": "intern\_new",

"table": "table\_0113\_6",

"user": "xuzhen@corp.netease.com",

"clusterId": "dev4",

"product": "intern"

}

响应体

名称 类型 描述 必传 默认值
code Number 状态码
msg String 错误信息
cost Number 接口消耗毫秒数
reqId String 请求ID
result TableDetail 结果

响应示例:

{

"code": 0,

"action": 0,

"msg": "success",

"result": {

    "groupId": 65,

    "groupName": "unknown",

    "productId": 25,

    "product": "intern",

    "clusterId": "dev4",

    "clusterName": "新集群",

    "db": "intern\_new",

    "table": "table\_0113\_6",

    "owner": {

        "user": "xuzhen@corp.netease.com",

        "fullName": "徐臻"

    },

    "comment": "产出脚本+测试上下游表",

    "primaryKeys": \[

        "id"

    \],

    "datasourceName": "dev4-hive",

    "datasourceType": "hive",

    "tableType": "internal",

    "searchCount": 92,

    "collectCount": 2,

    "referCount": 0,

    "readCount": 0,

    "businessInfo": {

        "subjectDomain": \[\],

        "recommend": false,

        "core": false,

        "hasCollected": true

    },

    "storageInfo": {

        "totalSize": "0.0B",

        "filesNumber": 0,

        "storageType": "text文件",

        "serializationType": "自定义分隔符",

        "location": "hdfs://dev4/user/intern/hive\_db/intern\_new.db/table\_0113\_6",

        "createTime": "2022-01-13 14:35:16",

        "updateTime": "2022-03-21 14:35:39",

        "partition": false,

        "partitionLifeCycle": "永久",

        "tableLifeCycle": "1111天",

        "deleteDir": false

    },

    "indexs": \[\],

    "datasourceId": 1031

},

"reqId": "b14d9e870e154766a9f270cedc8ba8c5",

"cost": 492

}

2.2.2 字段信息

POST /field/v1/info/get

产品版本:v1.5.2

描述:表的字段信息

URL参数/请求体

见 TableParam

请求示例:

{

"datasourceId": 1031,

"db": "intern\_new\_dev",

"table": "dws\_zmtest\_ddddd\_di",

"user":"xuzhen@corp.netease.com",

"clusterId": "dev4",

"product": "intern"

}

响应体

名称 类型 描述 必传 默认值
code Number 状态码
msg String 错误信息
cost Number 接口消耗毫秒数
reqId String 请求ID
result TableFields 结果

{

"code": 0,

"action": 0,

"msg": "success",

"result": {

    "primaryKeys": \[

        "id",

        "name"

    \],

    "indexs": \[

        {

            "id": 180,

            "name": "qqqaaqaACfffffd21",

            "abbr": "aaqqaaasdsdaa",

            "type": "index"

        },

        {

            "id": 181,

            "name": "aqqaaACfffffd1aaaaazxczczczczx",

            "abbr": "ddaqqaaa1",

            "type": "index"

        }

    \],

    "total": 9,

    "fields": \[

        {

            "id": 1,

            "name": "id",

            "type": "string",

            "comment": "asdb",

            "enumKey": false,

            "partitionKey": false,

            "primaryKey": false,

            "caliber": "11111",

            "labelType": "index",

            "labelValues": \[

                {

                    "id": 100438,

                    "name": "zzzz1213",

                    "abbr": "zzzz1213",

                    "type": "index"

                }

            \]

        },

        {

            "id": 2,

            "name": "name",

            "type": "string",

            "comment": "22",

            "enumKey": false,

            "partitionKey": false,

            "primaryKey": false,

            "caliber": "",

            "labelType": "index",

            "labelValues": \[

                {

                    "id": 182,

                    "name": "aqqaaACfffffd2afadsfads1234",

                    "abbr": "ddaqqaaa21234",

                    "type": "index"

                },

                {

                    "id": 183,

                    "name": "aqqaaACfffffd3",

                    "abbr": "ddqqaaaa3",

                    "type": "index"

                },

                {

                    "id": 185,

                    "name": "aaqqa1w",

                    "abbr": "aa2qq",

                    "type": "index"

                },

                {

                    "id": 204,

                    "name": "调度aaqaAqqCfffffd21阿aaaffaaaaaadzz11",

                    "abbr": "aa1123aaadsffff111122\_fdsd",

                    "type": "index"

                }

            \]

        },

        {

            "id": 3,

            "name": "hobby",

            "type": "string",

            "comment": "2222",

            "enumKey": false,

            "partitionKey": false,

            "primaryKey": false,

            "caliber": "",

            "labelType": "dimension",

            "labelValues": \[

                {

                    "id": 96,

                    "name": "test3",

                    "abbr": "test3",

                    "type": "dimension"

                }

            \]

        },

        {

            "id": 4,

            "name": "dept",

            "type": "string",

            "comment": "111",

            "enumKey": false,

            "partitionKey": false,

            "primaryKey": false,

            "caliber": "",

            "labelType": "dimension",

            "labelValues": \[

                {

                    "id": 113,

                    "name": "test6",

                    "abbr": "test6",

                    "type": "dimension"

                }

            \]

        },

        {

            "id": 5,

            "name": "dept2",

            "type": "string",

            "comment": "asdf",

            "enumKey": false,

            "partitionKey": false,

            "primaryKey": false

        },

        {

            "id": 6,

            "name": "dept3",

            "type": "string",

            "enumKey": false,

            "partitionKey": false,

            "primaryKey": false

        },

        {

            "id": 7,

            "name": "res\_type",

            "type": "string",

            "comment": "原始日志的资源类型type字段",

            "enumKey": false,

            "partitionKey": false,

            "primaryKey": false

        },

        {

            "id": 8,

            "name": "props",

            "type": "map<string, string>",

            "comment": "原始日志附加参数(排除已解析部分及部分非业务参数)",

            "enumKey": false,

            "partitionKey": false,

            "primaryKey": false

        },

        {

            "id": 9,

            "name": "dt",

            "type": "string",

            "comment": "",

            "enumKey": false,

            "partitionKey": true,

            "primaryKey": false,

            "caliber": "",

            "labelType": "dimension",

            "labelValues": \[

                {

                    "id": 112,

                    "name": "test5",

                    "abbr": "test5",

                    "type": "dimension"

                }

            \]

        }

    \]

},

"reqId": "8bcb1d2089b443e6a823fcc043469235",

"cost": 847

}

2.2.3 hive数据预览

POST /table/v1/data/preview

产品版本:v1.5.2

描述:表预览信息

URL参数/请求体

见: TablePreviewParam

请求示例:

{

"user":"xuzhen@corp.netease.com",

"clusterId": "dev4",

"product": "intern",

"table": "table\_0113\_6",

"db": "intern\_new",

"datasourceId": 1031

}

响应体

名称 类型 描述 必传 默认值
code Number 状态码
msg String 错误信息
cost Number 接口消耗毫秒数
reqId String 请求ID
result TablePrevData 结果

{

"code": 0,

"action": 0,

"msg": "success",

"result": {

    "partname": null,

    "columns": \[

        "id"

    \],

    "columnTypes": \[

        "int"

    \],

    "datas": \[\]

},

"reqId": "287a2fa152e84f82900419b6c1095ea9",

"cost": 10247

}

2.2.4 dml记录

GET /table/v1/dml/get

产品版本:v1.5.2

描述:获取表dml记录

URL参数/请求体

请求示例:

名称 类型 描述 必须 默认值
datasourceId Long 数据源id
db String 库名
table String 表名
type List<TableDdlTypeEnum> 操作类型 17,18,19,20
product String 项目名
startTime Number 起始时间戳
endTime Number 结束时间戳
pageNum Number 页数 1
pageSize Number 大小 10
orderType SortTypeEnum 排序方式 desc

product=intern&db=intern_new&table=table_0113_6&startTime=1646150400000&endTime=1646724756135&pageNum=1&pageSize=3&orderType=desc

响应体

名称 类型 描述 必传 默认值
code Number 状态码
msg String 错误信息
cost Number 接口消耗毫秒数
reqId String 请求ID
result PageResult<TableDdl> 结果

{

"code": 0,

"action": 0,

"msg": "success",

"result": {

    "pageNum": 1,

    "pageSize": 3,

    "totalCount": 21,

    "totalPage": 7,

    "list": \[

        {

            "modifiedTime": "2022-03-08 14:35:49",

            "type": 18,

            "execSql": "insert into table table\_0113\_6 select \* from table\_0113\_7;",

            "operator": {

                "fullName": "徐臻",

                "user": "xuzhen@corp.netease.com"

            }

        },

        {

            "modifiedTime": "2022-03-08 14:35:35",

            "type": 18,

            "execSql": "insert into table table\_0113\_6 select \* from table\_0113\_5",

            "operator": {

                "fullName": "徐臻",

                "user": "xuzhen@corp.netease.com"

            }

        },

        {

            "modifiedTime": "2022-03-08 14:35:34",

            "type": 18,

            "execSql": "insert into table table\_0113\_6 select \* from table\_0113\_4",

            "operator": {

                "fullName": "徐臻",

                "user": "xuzhen@corp.netease.com"

            }

        }

    \]

},

"reqId": "7915ebbe3a9b4d48a55dce14bb3c9f5e",

"cost": 515

}

2.3 数仓OpenAPI

2.3.1 数仓表筛选

POST /subject/v1/table/list

产品版本:v1.5.2

描述:条件筛选数仓表

URL参数/请求体

见: SubjectTableParam

请求示例:

{

"pageNum": 1,

"pageSize": 2,

"clusterId": "dev4",

"product": "intern"

}

响应体

名称 类型 描述 必传 默认值
code Number 状态码
msg String 错误信息
cost Number 接口消耗毫秒数
reqId String 请求ID
result PageResult<WarehouseTable> 结果

{

"code": 0,

"action": 0,

"msg": "success",

"result": {

    "pageNum": 1,

    "pageSize": 2,

    "totalCount": 331,

    "totalPage": 166,

    "list": \[

        {

            "db": "dev",

            "table": "ads\_approvers\_1",

            "tableOwner": {

                "user": "liuweimin@corp.netease.com",

                "fullName": "刘为民"

            },

            "primaryKeys": \[\],

            "layer": "hello",

            "subjectFullName": \[

                "test2/test1a"

            \],

            "clusterId": "dev4",

            "recommend": false,

            "core": false

        },

        {

            "db": "easyds",

            "table": "test1",

            "tableOwner": {

                "user": "chenzhihui@corp.netease.com",

                "fullName": "陈志辉"

            },

            "primaryKeys": \[\],

            "layer": "easyDs",

            "subjectFullName": \[

                "test2/test1a"

            \],

            "clusterId": "dev4",

            "recommend": false,

            "core": false

        }

    \]

},

"reqId": "ca72f5c8e928480fbf9c03eadfc4975b",

"cost": 508

}

2.3.2 主题列表

GET /subject/v1/list

产品版本:v1.5.2

描述:获取主题域列表

URL参数/请求体

名称 类型 描述 必须 默认值
groupId Number 项目组ID
clusterId String 集群ID

请求示例:

groupId=65&clusterId=dev4

响应体

名称 类型 描述 必传 默认值
code Number 状态码
msg String 错误信息
cost Number 接口消耗毫秒数
reqId String 请求ID
result List<Subject> 结果
    {

        "id": 307,

        "parentId": 0,

        "name": "仓储",

        "abbr": "cangchu",

        "description": "<p>haha</p><p><img src=\\"/ed/api/image/v1/image/b96a0592\\"></p><p>d </p><p>d </p>",

        "level": 1,

        "sort": 1,

        "presetFlag": 0,

        "creator": {

            "user": "grp.mammut@corp.netease.com",

            "fullName": "grp.mammut"

        },

        "modifier": {

            "user": "grp.mammut@corp.netease.com",

            "fullName": "grp.mammut"

        },

        "fullPathName": "仓储",

        "fullPathId": "307",

        "groupId": 65,

        "clusterId": "dev4",

        "currentOwners": \[

            {

                "user": "huangqiuxia@corp.netease.com",

                "fullName": "黄秋霞"

            },

            {

                "user": "grp.mammut\_test@corp.netease.com",

                "fullName": "mammut\_test"

            },

            {

                "user": "pangsitan@corp.netease.com",

                "fullName": "庞司坦"

            },

            {

                "user": "xuhua01@corp.netease.com",

                "fullName": "徐华"

            }

        \],

        "owners": \[

            {

                "user": "huangqiuxia@corp.netease.com",

                "fullName": "黄秋霞"

            },

            {

                "user": "grp.mammut\_test@corp.netease.com",

                "fullName": "mammut\_test"

            },

            {

                "user": "pangsitan@corp.netease.com",

                "fullName": "庞司坦"

            },

            {

                "user": "xuhua01@corp.netease.com",

                "fullName": "徐华"

            }

        \],

        "children": \[

            {

                "id": 397,

                "parentId": 307,

                "name": "入仓库",

                "abbr": "instore",

                "description": "",

                "level": 2,

                "sort": 1,

                "presetFlag": 0,

                "creator": {

                    "user": "pangsitan@corp.netease.com"

                },

                "modifier": {

                    "user": "pangsitan@corp.netease.com"

                },

                "fullPathName": "仓储/入仓库",

                "fullPathId": "307/397",

                "groupId": 65,

                "clusterId": "dev4",

                "currentOwners": \[\],

                "owners": \[

                    {

                        "user": "huangqiuxia@corp.netease.com",

                        "fullName": "黄秋霞"

                    },

                    {

                        "user": "grp.mammut\_test@corp.netease.com",

                        "fullName": "mammut\_test"

                    },

                    {

                        "user": "pangsitan@corp.netease.com",

                        "fullName": "庞司坦"

                    },

                    {

                        "user": "xuhua01@corp.netease.com",

                        "fullName": "徐华"

                    }

                \],

                "children": \[

                    {

                        "id": 444,

                        "parentId": 397,

                        "name": "dsd",

                        "abbr": "testds",

                        "description": "",

                        "level": 3,

                        "sort": 1,

                        "presetFlag": 0,

                        "creator": {

                            "user": "huangqiuxia@corp.netease.com"

                        },

                        "modifier": {

                            "user": "huangqiuxia@corp.netease.com"

                        },

                        "fullPathName": "仓储/入仓库/dsd",

                        "fullPathId": "307/397/444",

                        "groupId": 65,

                        "clusterId": "dev4",

                        "currentOwners": \[\],

                        "owners": \[

                            {

                                "user": "huangqiuxia@corp.netease.com",

                                "fullName": "黄秋霞"

                            },

                            {

                                "user": "grp.mammut\_test@corp.netease.com",

                                "fullName": "mammut\_test"

                            },

                            {

                                "user": "pangsitan@corp.netease.com",

                                "fullName": "庞司坦"

                            },

                            {

                                "user": "xuhua01@corp.netease.com",

                                "fullName": "徐华"

                            }

                        \],

                        "children": \[\]

                    }

                \]

            }

        \]

    }

2.4 新增搜索资产详情(1.9.0)

2.4.1 根据资产名称和资产类型(表、指标、标签)搜索资产

备注:表的搜索范围是物理表和逻辑表,如果结果是物理表则没有逻辑表的相关字段,指标、标签的搜索范围是已发布的指标、标签

POST /asset/v2/search

产品版本:v2.0.0

描述:资产名称资产类型搜索资产

URL参数/请求体

{

"email":"chenhongyu05@corp.netease.com",

"groupId":65,

"pageNum":1,

"pageSize":3,

"searchType":"all",

"keyword":"",

"assetCatalog":"XZS"

}

名称 类型 描述 必须 默认值
email String 邮箱
groupId Number 项目组id
pageNum Number 页码
pageSize Number 页码大小
searchType String index/table/tag/all 是,为all返回所有类型
keyword String 关键字
assetCatalog String 资产目录id

响应体

名称 类型 描述 必传 默认值
code Number 状态码
msg String 错误信息
cost Number 接口消耗毫秒数
reqId String 请求ID
result AssetPageResult 结果

{

"code": 0,

"msg": "success",

"result": {

    "pageNum": 1,

    "pageSize": 2,

    "totalCount": 37,

    "list": \[

        {

            "searchType": "table",

            "datasourceType": "hive",

            "datasourceTypeAlias": "hive",

            "datasourceName": "dev4-hive",

            "catalogName": "dev4-catalog",

            "accountName": "intern",

            "accountId": 25,

            "clusterId": "dev4",

            "databaseName": "intern\_new",

            "tableName": "hive\_0524\_1",

            "owner": "金雨鑫",

            "description": "note1",

            "partitioned": false,

            "partitionLifeCycle": "永久",

            "tableLifeCycle": "永久",

            "tablecore": null,

            "recommendTable": null,

            "level": "ads",

            "domain": \[

                "用户域"

            \],

            "referCount": 0,

            "readCount": 0,

            "collectCount": 0,

            "searchCount": 12,

            "security": "-",

            "hasBrowsed": false,

            "assetCatalog": \[

                {

                    "identifier": "sadsa",

                    "name": "来源地市",

                    "fullPath": "/江苏省/徐州市"

                },

                {

                    "identifier": "OBJ",

                    "name": "对象类别",

                    "fullPath": "/车辆信息"

                },

                {

                    "identifier": "ORG\_SYS1",

                    "name": "来源系统",

                    "fullPath": "/信用系统"

                },

                {

                    "identifier": "SJFK",

                    "name": "数据分库",

                    "fullPath": "/专题库"

                }

            \],

            "tableCnName": "zhongwen1",

            "securityLevel": "1",

            "tableQualityScore": "100"

        },

        {

            "searchType": "table",

            "datasourceType": "hive",

            "datasourceTypeAlias": "hive",

            "datasourceName": "ab49f8ac-5778-4be6-9cd8-1e9eff074787",

            "catalogName": "hz1-hive-catalog",

            "accountName": "intern",

            "accountId": 25,

            "clusterId": "hz1",

            "databaseName": "yixin",

            "tableName": "yx\_app\_log2",

            "owner": null,

            "description": "yixin ???? hive?",

            "partitioned": false,

            "partitionLifeCycle": "永久",

            "tableLifeCycle": "永久",

            "tablecore": null,

            "recommendTable": null,

            "level": "-",

            "domain": \[\],

            "referCount": 0,

            "readCount": 0,

            "collectCount": 0,

            "searchCount": 2,

            "security": "-",

            "hasBrowsed": false,

            "assetCatalog": \[\],

            "tableCnName": null,

            "securityLevel": null,

            "tableQualityScore": null

        }

    \],

    "aggregations": {

        "table": {

            "dataSourceType": \[

                {

                    "tag": "hive",

                    "tagAliasName": "hive",

                    "count": 27

                },

                {

                    "tag": "kafka",

                    "tagAliasName": "kafka",

                    "count": 1

                },

                {

                    "tag": "mysql",

                    "tagAliasName": "mysql",

                    "count": 4

                },

                {

                    "tag": "oracle",

                    "tagAliasName": "oracle",

                    "count": 5

                }

            \],

            "database": \[

                {

                    "tag": "db\_11",

                    "tagAliasName": "db\_11",

                    "count": 4

                },

                {

                    "tag": "db\_intern\_num\_1",

                    "tagAliasName": "db\_intern\_num\_1",

                    "count": 1

                },

                {

                    "tag": "dev",

                    "tagAliasName": "dev",

                    "count": 2

                },

                {

                    "tag": "dev\_dev",

                    "tagAliasName": "dev\_dev",

                    "count": 3

                },

                {

                    "tag": "easy\_design",

                    "tagAliasName": "easy\_design",

                    "count": 2

                },

                {

                    "tag": "easyds",

                    "tagAliasName": "easyds",

                    "count": 2

                },

                {

                    "tag": "easyds\_test",

                    "tagAliasName": "easyds\_test",

                    "count": 2

                },

                {

                    "tag": "intern\_new",

                    "tagAliasName": "intern\_new",

                    "count": 2

                },

                {

                    "tag": "mammut\_cdh",

                    "tagAliasName": "mammut\_cdh",

                    "count": 4

                },

                {

                    "tag": "rr",

                    "tagAliasName": "rr",

                    "count": 1

                },

                {

                    "tag": "streamdb\_test",

                    "tagAliasName": "streamdb\_test",

                    "count": 1

                },

                {

                    "tag": "test",

                    "tagAliasName": "test",

                    "count": 1

                },

                {

                    "tag": "yixin",

                    "tagAliasName": "yixin",

                    "count": 8

                },

                {

                    "tag": "youdata",

                    "tagAliasName": "youdata",

                    "count": 4

                }

            \],

            "accounts": \[

                {

                    "tag": "data\_transform",

                    "tagAliasName": "data\_transform",

                    "count": 6

                },

                {

                    "tag": "intern",

                    "tagAliasName": "intern",

                    "count": 31

                }

            \],

            "level": \[

                {

                    "tag": "unknownLevel",

                    "tagAliasName": "未分层",

                    "count": 37

                }

            \],

            "domain": \[

                {

                    "tag": "unknownDomain",

                    "tagAliasName": "未分组",

                    "count": 37

                }

            \],

            "core": \[

                {

                    "tag": "false",

                    "tagAliasName": "false",

                    "count": 5

                },

                {

                    "tag": "true",

                    "tagAliasName": "true",

                    "count": 2

                }

            \],

            "assetCatalog": \[

                {

                    "name": "来源地市",

                    "count": 1,

                    "identifier": "sadsa",

                    "children": \[

                        {

                            "name": "浙江省",

                            "count": 0,

                            "identifier": "ZJS",

                            "children": null

                        },

                        {

                            "name": "杭州市",

                            "count": 0,

                            "identifier": "HZS",

                            "children": \[

                                {

                                    "name": "滨江区",

                                    "count": 0,

                                    "identifier": "BJQ",

                                    "children": null

                                },

                                {

                                    "name": "余杭区",

                                    "count": 0,

                                    "identifier": "YHQ",

                                    "children": null

                                }

                            \]

                        },

                        {

                            "name": "江苏省",

                            "count": 1,

                            "identifier": "JSS",

                            "children": \[

                                {

                                    "name": "徐州市",

                                    "count": 1,

                                    "identifier": "XZS",

                                    "children": null

                                }

                            \]

                        }

                    \]

                },

                {

                    "name": "来源系统",

                    "count": 1,

                    "identifier": "ORG\_SYS1",

                    "children": \[

                        {

                            "name": "用户系统",

                            "count": 0,

                            "identifier": "USERSYS",

                            "children": null

                        },

                        {

                            "name": "信用系统",

                            "count": 1,

                            "identifier": "CRSYS",

                            "children": null

                        }

                    \]

                },

                {

                    "name": "对象类别",

                    "count": 1,

                    "identifier": "OBJ",

                    "children": \[

                        {

                            "name": "物品信息",

                            "count": 0,

                            "identifier": "WPXX",

                            "children": null

                        },

                        {

                            "name": "车辆信息",

                            "count": 1,

                            "identifier": "CLXX",

                            "children": null

                        }

                    \]

                },

                {

                    "name": "数据分库",

                    "count": 1,

                    "identifier": "SJFK",

                    "children": \[

                        {

                            "name": "主题库",

                            "count": 0,

                            "identifier": "ZTK",

                            "children": null

                        },

                        {

                            "name": "专题库",

                            "count": 1,

                            "identifier": "ZHTK",

                            "children": null

                        }

                    \]

                }

            \]

        }

    }

},

"reqId": "bedd0b715adb475c81a751f1adb220c6",

"cost": 2943

}

2.4.2 根据资产id查询资产详情(元数据基础描述信息、字段信息、数据预览、DDL记录、读写记录)

GET /table/v2/search

产品版本:v2.0.0

描述:根据资产id查询详情

URL参数/请求体

请求示例

/table/v2/search?tableIdCode=TB-00000222&email=chenhongyu05@corp.netease.com&groupId=65&start=1652025600000&end=1652676560779&total=100

名称 类型 描述 必须 默认值
groupId Number 项目组id
tableIdCode String 资产id(资产编码)
email String 邮箱
start Number ddl和dml记录开始时间戳 七天前时间戳
end Number ddl和dml记录结束时间戳 当前时间戳
total Number ddl和dml条数 100
clusterId String 当前集群id

响应体

名称 类型 描述 必传 默认值
code Number 状态码
msg String 错误信息
cost Number 接口消耗毫秒数
reqId String 请求ID
result AssetDetail 结果

{

"code": 0,

"msg": "success",

"result": {

    "logicTable": {

        "tableIdCode": "TB-00000222",

        "tableName": "dwd\_xz\_xztest\_testdict\_table\_0104\_1\_test12\_haha",

        "tableCnName": "表中文名称",

        "dbName": "dev",

        "domain": \[

            {

                "id": 189483,

                "bizId": 65,

                "type": "domainv2",

                "tag": "582",

                "parentTagId": 0,

                "keywords": \[

                    "物流",

                    "ship"

                \],

                "creator": "wangjinjie@corp.netease.com",

                "modifier": "wangjinjie@corp.netease.com",

                "parentTagType": null

            },

            {

                "id": 189485,

                "bizId": 65,

                "type": "domainv2",

                "tag": "583",

                "parentTagId": 189483,

                "keywords": \[

                    "顺丰",

                    "shunfeng"

                \],

                "creator": "wangjinjie@corp.netease.com",

                "modifier": "wangjinjie@corp.netease.com",

                "parentTagType": null

            }

        \],

        "createTableDdl": null,

        "layerTag": \[

            {

                "id": 189067,

                "bizId": 65,

                "type": "domainlevelv2",

                "tag": "212",

                "parentTagId": 0,

                "keywords": \[

                    "dwd",

                    "明细层"

                \],

                "creator": "zhaomin3@corp.netease.com",

                "modifier": "zhaomin3@corp.netease.com",

                "parentTagType": null

            }

        \],

        "storageType": null,

        "serializationFormat": null,

        "tableQualityScore": null,

        "securityLevel": null,

        "storageSize": null,

        "storagePath": null,

        "partitionInfo": null,

        "registrant": {

            "key": "陈虹宇",

            "value": "chenhongyu05@corp.netease.com"

        },

        "metaDataStatus": "CREATE",

        "updateRecord": null,

        "businessDesc": "是啥",

        "note": null,

        "assetCatalog": {

            "sadsa": \[

                {

                    "id": 577680,

                    "bizId": 65,

                    "type": "assetCatalog",

                    "tag": "ZJS",

                    "parentTagId": 577679,

                    "keywords": \[

                        "浙江省"

                    \],

                    "creator": "system",

                    "modifier": "system",

                    "parentTagType": null

                },

                {

                    "id": 577681,

                    "bizId": 65,

                    "type": "assetCatalog",

                    "tag": "HZS",

                    "parentTagId": 577679,

                    "keywords": \[

                        "杭州市"

                    \],

                    "creator": "system",

                    "modifier": "system",

                    "parentTagType": null

                },

                {

                    "id": 577682,

                    "bizId": 65,

                    "type": "assetCatalog",

                    "tag": "YHQ",

                    "parentTagId": 577679,

                    "keywords": \[

                        "余杭区"

                    \],

                    "creator": "system",

                    "modifier": "system",

                    "parentTagType": null

                }

            \],

            "OBJ": \[

                {

                    "id": 577721,

                    "bizId": 65,

                    "type": "assetCatalog",

                    "tag": "RYXX",

                    "parentTagId": 577715,

                    "keywords": \[

                        "人员信息"

                    \],

                    "creator": "system",

                    "modifier": "system",

                    "parentTagType": null

                },

                {

                    "id": 577725,

                    "bizId": 65,

                    "type": "assetCatalog",

                    "tag": "SFXX",

                    "parentTagId": 577715,

                    "keywords": \[

                        "身份信息"

                    \],

                    "creator": "system",

                    "modifier": "system",

                    "parentTagType": null

                }

            \],

            "ORG\_SYS1": \[

                {

                    "id": 577726,

                    "bizId": 65,

                    "type": "assetCatalog",

                    "tag": "USERSYS",

                    "parentTagId": 577716,

                    "keywords": \[

                        "用户系统"

                    \],

                    "creator": "system",

                    "modifier": "system",

                    "parentTagType": null

                }

            \],

            "SJFK": \[

                {

                    "id": 577723,

                    "bizId": 65,

                    "type": "assetCatalog",

                    "tag": "ZTK",

                    "parentTagId": 577717,

                    "keywords": \[

                        "主题库"

                    \],

                    "creator": "system",

                    "modifier": "system",

                    "parentTagType": null

                }

            \]

        },

        "dataSourceName": \[

            {

                "id": null,

                "bizId": 65,

                "type": null,

                "tag": "1031",

                "parentTagId": 0,

                "keywords": \[

                    "dev4-hive"

                \],

                "creator": "unknown",

                "modifier": "unknown",

                "parentTagType": null

            }

        \],

        "dataSourceType": "Hive",

        "dataSourceCluster": null,

        "groupId": 65,

        "techPrincipal": {

            "key": "hzmengjin@corp.netease.com",

            "value": "hzmengjin@corp.netease.com"

        },

        "businessPrincipal": {

            "key": "hzmengjin@corp.netease.com",

            "value": "hzmengjin@corp.netease.com"

        },

        "registerTime": "2022-05-12 18:24:56",

        "updateTime": "2022-05-12 18:24:56",

        "invalidTime": null,

        "columnInfos": null,

        "customFields": {

            "45603bd2c27a4ab9b524ecd5cf5da2f4": "\[\\"test1\\",\\"test2\\",\\"test3\\"\]"

        },

        "pageSize": 10,

        "pageNum": 1,

        "limit": 10,

        "offset": 0,

        "catalog": "dev4-catalog",

        "procInstId": null,

        "approver": null

    },

    "tableDetail": {

        "groupId": 97,

        "groupName": "data\_tranform",

        "productId": 678,

        "product": "data\_transform",

        "clusterId": "dev4",

        "clusterName": "新集群",

        "db": "dev",

        "table": "dwd\_xz\_xztest\_testdict\_table\_0104\_1\_test12\_haha",

        "owner": {

            "user": "xuzhen@corp.netease.com",

            "fullName": "徐臻"

        },

        "comment": "测试关联物理表",

        "primaryKeys": \[

            "col1"

        \],

        "datasourceName": "dev4-hive",

        "datasourceType": "hive",

        "tableType": "internal",

        "collectCount": 2,

        "referCount": 0,

        "readCount": 0,

        "businessInfo": {

            "subjectDomain": \[

                "xuzhen"

            \],

            "layer": "dwd",

            "levelRelType": \[

                "dimension",

                "metric"

            \],

            "impalaSync": true,

            "recommend": false,

            "core": false,

            "hasCollected": false,

            "hasSubscribed": false

        },

        "storageInfo": {

            "totalSize": "0.0B",

            "filesNumber": 0,

            "storageType": "Parquet",

            "serializationType": "Parquet",

            "location": "hdfs://dev4/user/intern/hive\_db/dev.db/dwd\_xz\_xztest\_testdict\_table\_0104\_1\_test12\_haha",

            "createTime": "2022-01-04 10:19:13",

            "updateTime": "2022-05-15 13:33:16",

            "partition": false,

            "partitionLifeCycle": "永久",

            "tableLifeCycle": "永久",

            "deleteDir": false

        },

        "indexs": \[\],

        "datasourceId": 1031

    },

    "fieldInfo": {

        "primaryKey": "col1",

        "indexs": \[\],

        "total": 2,

        "fields": \[

            {

                "id": 1,

                "name": "col1",

                "type": "string",

                "description": "12",

                "enumKey": false,

                "enumContent": null,

                "partitionKey": false,

                "primaryKey": true,

                "nullable": false,

                "autoIncrement": false,

                "uniqueConstraint": false,

                "constraint": null,

                "defaultValue": null,

                "extra": null,

                "caliber": null,

                "labelType": "dim",

                "labelValue": \[

                    {

                        "id": 119,

                        "name": "12",

                        "abbr": "12",

                        "type": "dim",

                        "address": null,

                        "mainTable": null,

                        "subTableList": null

                    }

                \],

                "appendedColumnList": \[

                    {

                        "identifier": "werew",

                        "appendedColumnName": "附加列1",

                        "tableKey": "appendedColumn1",

                        "value": ""

                    },

                    {

                        "identifier": "c40c3e963b9d541e29f63d33fbb9171f1",

                        "appendedColumnName": "字段分类",

                        "tableKey": "appendedColumn2",

                        "value": ""

                    },

                    {

                        "identifier": "cfd981d9cd46d49ddb63708944305f7d8",

                        "appendedColumnName": "字段中文名",

                        "tableKey": "appendedColumn3",

                        "value": ""

                    },

                    {

                        "identifier": "c0fa19efcec9644b39a5fa566312f2d78",

                        "appendedColumnName": "字段备注",

                        "tableKey": "appendedColumn4",

                        "value": ""

                    },

                    {

                        "identifier": "c68a0345379934ab180b6943e4dc15e17",

                        "appendedColumnName": "字段编码",

                        "tableKey": "appendedColumn5",

                        "value": ""

                    },

                    {

                        "identifier": "c86574eef73054ef6900d3ac57a8716aa",

                        "appendedColumnName": "zxmtt",

                        "tableKey": "appendedColumn6",

                        "value": ""

                    },

                    {

                        "identifier": "caacc634781c84ca281a9f9d4040f3fe2",

                        "appendedColumnName": "湖开发的首付款都市分行诉苦饭店烧烤机房内黑色的减肥的室内放开了角色地方行内考了多少分你还说了肯定",

                        "tableKey": "appendedColumn7",

                        "value": ""

                    },

                    {

                        "identifier": "c52b17733ea874007a3ef4f6228f3d3c5",

                        "appendedColumnName": "业务描述",

                        "tableKey": "appendedColumn8",

                        "value": ""

                    },

                    {

                        "identifier": "c771fa59b8e1e4843baf66e2d9ecc2fc1",

                        "appendedColumnName": "参照主数据",

                        "tableKey": "appendedColumn9",

                        "value": ""

                    },

                    {

                        "identifier": "cbe24b1f53b6c4f7593918a7cfa261f51",

                        "appendedColumnName": "安全等级",

                        "tableKey": "appendedColumn10",

                        "value": ""

                    },

                    {

                        "identifier": "column\_1641785289352",

                        "appendedColumnName": "布尔类型",

                        "tableKey": "appendedColumn11",

                        "value": ""

                    },

                    {

                        "identifier": "preset\_op",

                        "appendedColumnName": "操作人",

                        "tableKey": "appendedColumn12",

                        "value": ""

                    },

                    {

                        "identifier": "preset\_op\_time",

                        "appendedColumnName": "操作时间",

                        "tableKey": "appendedColumn13",

                        "value": ""

                    },

                    {

                        "identifier": "preset\_op\_action",

                        "appendedColumnName": "操作动作",

                        "tableKey": "appendedColumn14",

                        "value": ""

                    }

                \],

                "dataElement": null,

                "dataDict": null

            },

            {

                "id": 2,

                "name": "col2",

                "type": "string",

                "description": "aaaa",

                "enumKey": false,

                "enumContent": null,

                "partitionKey": false,

                "primaryKey": false,

                "nullable": false,

                "autoIncrement": false,

                "uniqueConstraint": false,

                "constraint": null,

                "defaultValue": null,

                "extra": null,

                "caliber": "",

                "labelType": null,

                "labelValue": null,

                "appendedColumnList": \[

                    {

                        "identifier": "werew",

                        "appendedColumnName": "附加列1",

                        "tableKey": "appendedColumn1",

                        "value": ""

                    },

                    {

                        "identifier": "c40c3e963b9d541e29f63d33fbb9171f1",

                        "appendedColumnName": "字段分类",

                        "tableKey": "appendedColumn2",

                        "value": ""

                    },

                    {

                        "identifier": "cfd981d9cd46d49ddb63708944305f7d8",

                        "appendedColumnName": "字段中文名",

                        "tableKey": "appendedColumn3",

                        "value": ""

                    },

                    {

                        "identifier": "c0fa19efcec9644b39a5fa566312f2d78",

                        "appendedColumnName": "字段备注",

                        "tableKey": "appendedColumn4",

                        "value": ""

                    },

                    {

                        "identifier": "c68a0345379934ab180b6943e4dc15e17",

                        "appendedColumnName": "字段编码",

                        "tableKey": "appendedColumn5",

                        "value": ""

                    },

                    {

                        "identifier": "c86574eef73054ef6900d3ac57a8716aa",

                        "appendedColumnName": "zxmtt",

                        "tableKey": "appendedColumn6",

                        "value": ""

                    },

                    {

                        "identifier": "caacc634781c84ca281a9f9d4040f3fe2",

                        "appendedColumnName": "湖开发的首付款都市分行诉苦饭店烧烤机房内黑色的减肥的室内放开了角色地方行内考了多少分你还说了肯定",

                        "tableKey": "appendedColumn7",

                        "value": ""

                    },

                    {

                        "identifier": "c52b17733ea874007a3ef4f6228f3d3c5",

                        "appendedColumnName": "业务描述",

                        "tableKey": "appendedColumn8",

                        "value": ""

                    },

                    {

                        "identifier": "c771fa59b8e1e4843baf66e2d9ecc2fc1",

                        "appendedColumnName": "参照主数据",

                        "tableKey": "appendedColumn9",

                        "value": ""

                    },

                    {

                        "identifier": "cbe24b1f53b6c4f7593918a7cfa261f51",

                        "appendedColumnName": "安全等级",

                        "tableKey": "appendedColumn10",

                        "value": ""

                    },

                    {

                        "identifier": "column\_1641785289352",

                        "appendedColumnName": "布尔类型",

                        "tableKey": "appendedColumn11",

                        "value": ""

                    },

                    {

                        "identifier": "preset\_op",

                        "appendedColumnName": "操作人",

                        "tableKey": "appendedColumn12",

                        "value": ""

                    },

                    {

                        "identifier": "preset\_op\_time",

                        "appendedColumnName": "操作时间",

                        "tableKey": "appendedColumn13",

                        "value": ""

                    },

                    {

                        "identifier": "preset\_op\_action",

                        "appendedColumnName": "操作动作",

                        "tableKey": "appendedColumn14",

                        "value": ""

                    }

                \],

                "dataElement": null,

                "dataDict": null

            }

        \]

    },

    "previewInfo": {

        "partname": null,

        "columns": \[

            "col1",

            "col2"

        \],

        "columnTypes": \[

            "string",

            "string"

        \],

        "datas": \[\]

    },

    "ddlList": \[

        {

            "modifiedTime": "2022-05-15 13:33:16",

            "type": 14,

            "execSql": "ALTER TABLE dev.dwd\_xz\_xztest\_testdict\_table\_0104\_1\_test12\_haha SET TBLPROPERTIES('comment' = '测试关联物理表')",

            "operator": {

                "name": "徐臻",

                "aliasName": "xuzhen@corp.netease.com"

            }

        }

    \],

    "dmlList": \[\]

},

"reqId": "cb4edc93c5674e799248f91c5b6059d8",

"cost": 3261

}

2.4.3 导入组织架构excel

excel格式:

POST /excel/import

产品版本:v2.0.0

描述:导入组织架构excel到地图数据库

POST 参数/请求体

请求示例,可以直接curl ,注意需要localhost换成真实的地图后端请求路径(请求前需要将excel放到地图服务的服务器上,最好放在地图的项目目录下,这样可以保证地图应用有读取权限),并将groupId替换成真实的项目组id,以及path换成真实的excel路径。

真实的项目组id可以在地图应用的/api/datamap/user/info接口bizId字段查看

通过openapi服务转发请求:

curl命令拼接格式:

curl --location --request POST 'http://{openapi服务的主机}: {openapi服务的端口}/openapi/easydmap/excel/import' --header 'Content-Type: application/json' --data '{"groupId":2,"authType":"TEST", "path":"/home/easyops/datamap_file/审批人.xlsx"}';

列子:

curl --location --request POST 'http://hadoop5439.jd.163.org:7098/openapi/easydmap/excel/import' --header 'Content-Type: application/json' --data '{"groupId":2,"authType":"TEST", "path":"/home/easyops/datamap_file/审批人.xlsx"}';

名称 类型 描述 必须 默认值
groupId Number 项目组id
path String 路径

groupId: 页面上,account/list 可以快速查看到当前项目对应的项目组id (bizId)

响应体

{

"code":0,

"action":0,

"msg":"success",

"result":true,

"reqId":"c250ed2b48e84e3d86ffb1ff1eaec8b8",

"cost":37306

}

名称 类型 描述 必传 默认值
code Number 状态码
msg String 信息
cost Number 接口消耗毫秒数
reqId String 请求ID
result Boolean 是否成功
2.4.4 已发布资产搜索

POST /asset/v3/search

产品版本:v2.2.0

描述:资产名称资产类型搜索已发布资产

URL参数/请求体

{

"email":"chenhongyu05@corp.netease.com",

"groupId":65,

"pageNum":1,

"pageSize":3,

"searchType":"table",

"keyword":"",

"assetCatalog":"XZS"

}

搜表

名称 类型 描述 必须 默认值
email String 邮箱
groupId Number 项目组id
pageNum Number 页码 1
pageSize Number 页码大小 10
searchType String index/table/tag
keyword String 搜索词(库表名,中文名称,tableIdCode) 不传返回全部
tableName String 表物理名称(仅搜表)
tableCnName String 表中文名称(仅搜表)
tableIdCode String 表编码(仅搜表)
businessPrincipals List<String> 业务负责人邮箱
techPrincipals List<String> 技术负责人邮箱
registrants List<String> 创建人邮箱
department String 主管部门
dataSourceTypes List<String> 数据源类型 Hive,MySQL,Vertica,Oracle,SQLServer
assetCatalog String 资产目录id
customAssetCatalog String
自定义目录id

搜指标

名称 类型 描述 必须 默认值
email String 邮箱
groupId Number 项目组id
pageNum Number 页码 1
pageSize Number 页码大小 10
searchType String index/table/tag
keyword String 搜索词(指标名称、指标标识) 不传返回全部
businessPrincipals List<String> 业务负责人邮箱
techPrincipals List<String> 技术负责人邮箱
registrants List<String> 创建人邮箱
department String 主管部门
indexName String 指标名称
indexPhysicalName String 指标物理名称
assetCatalog String 资产目录id
customAssetCatalog String
自定义目录id
domainId Number 指标域id(仅搜索指标时有效)
indexType String 0:主原子指标
1:衍生原子指标
2:派生指标
3:复合指标
(仅搜索指标时有效)

搜标签

名称 类型 描述 必须 默认值
email String 邮箱
groupId Number 项目组id
pageNum Number 页码 1
pageSize Number 页码大小 10
searchType String index/table/tag
keyword String 搜索词(标签名称、标签标识) 不传返回全部
businessPrincipals List<String> 业务负责人邮箱
techPrincipals List<String> 技术负责人邮箱
registrants List<String> 创建人邮箱
department String 主管部门
assetCatalog String 资产目录id
customAssetCatalog String
自定义目录id
tagName String 标签名称(仅搜标签)
tagPhysicalName String 标签物理名称(仅搜标签)

响应体

名称 类型 描述 必传 默认值
code Number 状态码
msg String 错误信息
cost Number 接口消耗毫秒数
reqId String 请求ID
result AssetPageResultV2 结果

{

"code": 0,

"msg": "success",

"result": {

    "pageNum": 1,

    "pageSize": 3,

    "totalCount": 1150,

    "list": \[

        {

            "catalog": "eds-catalog-1854",

            "db": "easyds",

            "table": "eds\_session",

            "comment": null,

            "owner": null,

            "tableIdCode": "TB-00018084",

            "tableCnName": null,

            "securityLevel": null,

            "tableQualityScore": null,

            "assetCatalog": \[

                {

                    "identifier": "OBJ",

                    "name": "对象类别",

                    "fullPath": "/人员信息/身份信息"

                }

            \],

            "customizeAssetCatalog": \[\],

            "concatId": "eds-catalog-1854\\teasyds\\teds\_session"

        },

        {

            "catalog": "eds-catalog-1854",

            "db": "easyds",

            "table": "orc\_test1",

            "comment": null,

            "owner": null,

            "tableIdCode": "TB-00018007",

            "tableCnName": null,

            "securityLevel": null,

            "tableQualityScore": null,

            "assetCatalog": \[\],

            "customizeAssetCatalog": \[\],

            "concatId": "eds-catalog-1854\\teasyds\\torc\_test1"

        },

        {

            "catalog": "eds-catalog-1854",

            "db": "easyds",

            "table": "eds\_impala\_queue\_permission",

            "comment": null,

            "owner": null,

            "tableIdCode": "TB-00018008",

            "tableCnName": null,

            "securityLevel": null,

            "tableQualityScore": null,

            "assetCatalog": \[\],

            "customizeAssetCatalog": \[\],

            "concatId": "eds-catalog-1854\\teasyds\\teds\_impala\_queue\_permission"

        }

    \],

    "aggregations": {

        "table": {

            "assetCatalog": \[

                {

                    "name": "对象类别",

                    "count": 1,

                    "identifier": "OBJ",

                    "catalogType": 0,

                    "description": "",

                    "createTime": "2022-05-11 17:15:23",

                    "creator": {

                        "email": "anyang@corp.netease.com",

                        "fullName": "安阳"

                    },

                    "children": \[

                        {

                            "name": "人员信息",

                            "count": 1,

                            "identifier": "CLXX1",

                            "catalogType": 0,

                            "description": "1rtyhrt",

                            "createTime": "2022-05-17 21:04:27",

                            "creator": {

                                "email": "anyang@corp.netease.com",

                                "fullName": "安阳"

                            },

                            "children": \[

                                {

                                    "name": "身份信息",

                                    "count": 1,

                                    "identifier": "SFXX",

                                    "catalogType": 0,

                                    "description": "",

                                    "createTime": "2022-05-11 17:16:39",

                                    "creator": {

                                        "email": "anyang@corp.netease.com",

                                        "fullName": "安阳"

                                    },

                                    "children": null

                                },

                                {

                                    "name": "学历信息",

                                    "count": 0,

                                    "identifier": "XLXX",

                                    "catalogType": 0,

                                    "description": "",

                                    "createTime": "2022-05-11 17:17:07",

                                    "creator": {

                                        "email": "anyang@corp.netease.com",

                                        "fullName": "安阳"

                                    },

                                    "children": \[

                                        {

                                            "name": "2",

                                            "count": 0,

                                            "identifier": "2234",

                                            "catalogType": 0,

                                            "description": "",

                                            "createTime": "2022-05-19 14:49:52",

                                            "creator": {

                                                "email": "huahaoze@corp.netease.com",

                                                "fullName": "华昊泽"

                                            },

                                            "children": \[

                                                {

                                                    "name": "567567",

                                                    "count": 0,

                                                    "identifier": "567",

                                                    "catalogType": 0,

                                                    "description": "",

                                                    "createTime": "2022-05-19 14:50:01",

                                                    "creator": {

                                                        "email": "huahaoze@corp.netease.com",

                                                        "fullName": "华昊泽"

                                                    },

                                                    "children": null

                                                }

                                            \]

                                        }

                                    \]

                                }

                            \]

                        },

                        {

                            "name": "物品信息",

                            "count": 0,

                            "identifier": "WPXX",

                            "catalogType": 0,

                            "description": "",

                            "createTime": "2022-05-11 17:16:03",

                            "creator": {

                                "email": "anyang@corp.netease.com",

                                "fullName": "安阳"

                            },

                            "children": null

                        },

                        {

                            "name": "车辆信息",

                            "count": 0,

                            "identifier": "CLXX",

                            "catalogType": 0,

                            "description": "",

                            "createTime": "2022-05-11 17:16:16",

                            "creator": {

                                "email": "anyang@corp.netease.com",

                                "fullName": "安阳"

                            },

                            "children": null

                        }

                    \]

                },

                {

                    "name": "数据分库",

                    "count": 1,

                    "identifier": "SJFK",

                    "catalogType": 0,

                    "description": "",

                    "createTime": "2022-05-11 17:18:43",

                    "creator": {

                        "email": "anyang@corp.netease.com",

                        "fullName": "安阳"

                    },

                    "children": \[

                        {

                            "name": "主题库",

                            "count": 0,

                            "identifier": "ZTK",

                            "catalogType": 0,

                            "description": "",

                            "createTime": "2022-05-11 17:19:18",

                            "creator": {

                                "email": "anyang@corp.netease.com",

                                "fullName": "安阳"

                            },

                            "children": null

                        },

                        {

                            "name": "专题库",

                            "count": 1,

                            "identifier": "ZHTK",

                            "catalogType": 0,

                            "description": "",

                            "createTime": "2022-05-11 17:19:39",

                            "creator": {

                                "email": "anyang@corp.netease.com",

                                "fullName": "安阳"

                            },

                            "children": null

                        }

                    \]

                },

                {

                    "name": "所属业务条线",

                    "count": 0,

                    "identifier": "depart",

                    "catalogType": 0,

                    "description": "",

                    "createTime": "2022-07-06 11:04:48",

                    "creator": {

                        "email": "zengxiaomin@corp.netease.com",

                        "fullName": "曾晓敏"

                    },

                    "children": \[

                        {

                            "name": "部门1",

                            "count": 0,

                            "identifier": "depart1",

                            "catalogType": 0,

                            "description": "",

                            "createTime": "2022-07-06 11:05:15",

                            "creator": {

                                "email": "zengxiaomin@corp.netease.com",

                                "fullName": "曾晓敏"

                            },

                            "children": null

                        }

                    \]

                },

                {

                    "name": "所属项目",

                    "count": 0,

                    "identifier": "finance",

                    "catalogType": 0,

                    "description": "",

                    "createTime": "2022-07-06 11:05:35",

                    "creator": {

                        "email": "zengxiaomin@corp.netease.com",

                        "fullName": "曾晓敏"

                    },

                    "children": \[

                        {

                            "name": "财务1",

                            "count": 0,

                            "identifier": "c1",

                            "catalogType": 0,

                            "description": "",

                            "createTime": "2022-07-06 11:05:46",

                            "creator": {

                                "email": "zengxiaomin@corp.netease.com",

                                "fullName": "曾晓敏"

                            },

                            "children": null

                        }

                    \]

                },

                {

                    "name": "业务系统",

                    "count": 1,

                    "identifier": "111111111111111111",

                    "catalogType": 1,

                    "description": null,

                    "createTime": "2022-07-13 16:06:38",

                    "creator": {

                        "email": "yulunduan@corp.netease.com",

                        "fullName": "俞伦端"

                    },

                    "children": \[\]

                },

                {

                    "name": "自定义根目录",

                    "count": 0,

                    "identifier": "catalog\_root",

                    "catalogType": 1,

                    "description": null,

                    "createTime": "2022-08-24 14:12:16",

                    "creator": {

                        "email": "xuzhen@corp.netease.com",

                        "fullName": "徐臻"

                    },

                    "children": \[\]

                },

                {

                    "name": "内容",

                    "count": 0,

                    "identifier": "neirong",

                    "catalogType": 1,

                    "description": null,

                    "createTime": "2022-08-25 11:37:30",

                    "creator": {

                        "email": "hzzhangmengqin@corp.netease.com",

                        "fullName": "hzzhangmengqin"

                    },

                    "children": \[

                        {

                            "name": "歌曲",

                            "count": 0,

                            "identifier": "gequ",

                            "catalogType": 1,

                            "description": null,

                            "createTime": "2022-08-25 11:37:44",

                            "creator": {

                                "email": "hzzhangmengqin@corp.netease.com",

                                "fullName": "hzzhangmengqin"

                            },

                            "children": \[\]

                        },

                        {

                            "name": "歌单",

                            "count": 0,

                            "identifier": "gedan",

                            "catalogType": 1,

                            "description": null,

                            "createTime": "2022-08-25 11:37:58",

                            "creator": {

                                "email": "hzzhangmengqin@corp.netease.com",

                                "fullName": "hzzhangmengqin"

                            },

                            "children": \[\]

                        },

                        {

                            "name": "艺人",

                            "count": 0,

                            "identifier": "yiren",

                            "catalogType": 1,

                            "description": null,

                            "createTime": "2022-08-25 11:38:21",

                            "creator": {

                                "email": "hzzhangmengqin@corp.netease.com",

                                "fullName": "hzzhangmengqin"

                            },

                            "children": \[\]

                        },

                        {

                            "name": "声音",

                            "count": 0,

                            "identifier": "shengyin",

                            "catalogType": 1,

                            "description": null,

                            "createTime": "2022-08-25 11:38:39",

                            "creator": {

                                "email": "hzzhangmengqin@corp.netease.com",

                                "fullName": "hzzhangmengqin"

                            },

                            "children": \[\]

                        },

                        {

                            "name": "播单",

                            "count": 0,

                            "identifier": "bodan",

                            "catalogType": 1,

                            "description": null,

                            "createTime": "2022-08-25 11:38:51",

                            "creator": {

                                "email": "hzzhangmengqin@corp.netease.com",

                                "fullName": "hzzhangmengqin"

                            },

                            "children": \[\]

                        },

                        {

                            "name": "伴奏",

                            "count": 0,

                            "identifier": "banzou",

                            "catalogType": 1,

                            "description": null,

                            "createTime": "2022-08-25 11:39:09",

                            "creator": {

                                "email": "hzzhangmengqin@corp.netease.com",

                                "fullName": "hzzhangmengqin"

                            },

                            "children": \[\]

                        }

                    \]

                },

                {

                    "name": "社区",

                    "count": 0,

                    "identifier": "shequ",

                    "catalogType": 1,

                    "description": "主要描述社区业务的数据资产,包含关注、评论、动态、视频、话题、圈子等社区子业务。 社区是人与人聚合,用户在听歌的同时逛一逛社区,与其他用户产生互动,是一个用户回到云音乐的重要因素之一,良好的互动氛围也是区别于其他音乐APP的一个点。社区的存在让云音乐不再是一个简单的听歌工具。",

                    "createTime": "2022-08-25 11:39:35",

                    "creator": {

                        "email": "hzzhangmengqin@corp.netease.com",

                        "fullName": "hzzhangmengqin"

                    },

                    "children": \[

                        {

                            "name": "关注",

                            "count": 0,

                            "identifier": "guanzhu",

                            "catalogType": 1,

                            "description": null,

                            "createTime": "2022-08-25 11:39:50",

                            "creator": {

                                "email": "hzzhangmengqin@corp.netease.com",

                                "fullName": "hzzhangmengqin"

                            },

                            "children": \[\]

                        },

                        {

                            "name": "动态",

                            "count": 0,

                            "identifier": "dongtai",

                            "catalogType": 1,

                            "description": null,

                            "createTime": "2022-08-25 11:40:04",

                            "creator": {

                                "email": "hzzhangmengqin@corp.netease.com",

                                "fullName": "hzzhangmengqin"

                            },

                            "children": \[\]

                        },

                        {

                            "name": "视频",

                            "count": 0,

                            "identifier": "shipin",

                            "catalogType": 1,

                            "description": null,

                            "createTime": "2022-08-25 11:40:20",

                            "creator": {

                                "email": "hzzhangmengqin@corp.netease.com",

                                "fullName": "hzzhangmengqin"

                            },

                            "children": \[

                                {

                                    "name": "Mlog",

                                    "count": 0,

                                    "identifier": "mlog",

                                    "catalogType": 1,

                                    "description": null,

                                    "createTime": "2022-08-25 11:40:33",

                                    "creator": {

                                        "email": "hzzhangmengqin@corp.netease.com",

                                        "fullName": "hzzhangmengqin"

                                    },

                                    "children": \[\]

                                },

                                {

                                    "name": "Video",

                                    "count": 0,

                                    "identifier": "Video",

                                    "catalogType": 1,

                                    "description": null,

                                    "createTime": "2022-08-25 11:40:49",

                                    "creator": {

                                        "email": "hzzhangmengqin@corp.netease.com",

                                        "fullName": "hzzhangmengqin"

                                    },

                                    "children": \[\]

                                },

                                {

                                    "name": "MV",

                                    "count": 0,

                                    "identifier": "MV",

                                    "catalogType": 1,

                                    "description": null,

                                    "createTime": "2022-08-25 11:41:03",

                                    "creator": {

                                        "email": "hzzhangmengqin@corp.netease.com",

                                        "fullName": "hzzhangmengqin"

                                    },

                                    "children": \[\]

                                }

                            \]

                        },

                        {

                            "name": "评论",

                            "count": 0,

                            "identifier": "pinglun",

                            "catalogType": 1,

                            "description": null,

                            "createTime": "2022-08-25 11:48:44",

                            "creator": {

                                "email": "hzzhangmengqin@corp.netease.com",

                                "fullName": "hzzhangmengqin"

                            },

                            "children": \[\]

                        },

                        {

                            "name": "话题",

                            "count": 0,

                            "identifier": "huati",

                            "catalogType": 1,

                            "description": null,

                            "createTime": "2022-08-25 11:49:00",

                            "creator": {

                                "email": "hzzhangmengqin@corp.netease.com",

                                "fullName": "hzzhangmengqin"

                            },

                            "children": \[\]

                        }

                    \]

                },

                {

                    "name": "资产目录测试\_sadas",

                    "count": 0,

                    "identifier": "sadsad",

                    "catalogType": 1,

                    "description": null,

                    "createTime": "2022-08-31 19:55:49",

                    "creator": {

                        "email": "yulunduan@corp.netease.com",

                        "fullName": "俞伦端"

                    },

                    "children": \[\]

                }

            \]

        }

    },

    "tableTotalCount": 26,

    "indexTotalCount": 187,

    "tagTotalCount": 937

},

"reqId": "06947d69f66846689417e900d327c7f7",

"cost": 1501

}

2.5 元数据OpenAPI

2.5.1 元数据治理更新

POST /datamap/openapi/logic/data/update

产品版本:2.3.1

描述:支持根据jdbc连接串,类型,db, table 进行表和列的信息更新

1) 更新表安全等级,customFields

2) 更新customField内部的Map值

3) 若元数据治理中缺少这张表,会在元数据注册中生成一个逻辑表

产品版本:2.3.2

描述:

需要传updateStrategy,updateStrategy 为PUT_IF_ABSENT ,会根据数据源ID查询catalog

默认updateStrategy为UPSERT,会根据url,user,type查询catalog

1) 支持数据源范围与元数据治理相同

2) 更新指定状态的元数据 ,metaDataStatus字段,不传metaDataStatus字段,默认为发布态

3) 若逻辑表对应字段信息为空,则填充。非空,跳过。

4) 系统内置字段不进行值域校验

5) 系统内置字段不可更改的有:

  • datasourceName(数据源名称)

  • datasourceType(数据源类型)

  • db(数据库)

  • table(表名)

  • tableIdCode(表资产编码)

  • registrant(注册人)

  • registerTime(注册时间)

  • metaDataStatus(元数据状态)

  • metaDataType(元数据类型)

  • columnName(列名)

7) 与其他子系统交互字段不可更改:

  • domain(主题域)

  • layerTag (分层)

  • assetCatalog(资产目录)

  • customizeAssetCatalog(自定义资产目录)

  • tableDqInfo(表质量信息)

  • rawDict(原始字典)

  • dataElement(数据元)

  • standardDict(标准字典)

  • dqInfo(字段数据质量信息)

  • logicLabelInfos(标签)

  • logicIndexInfos(指标)

8) 自定义字段查询的是field_name字段,对应前端表单的属性名称

9) 枚举单选,枚举多选进行值域校验

URL参数/请求体

LogicTableV2

{

#hive数据源,通过url定位数据源模式必填

"url":"jdbc:mysql://bdms-jd-hive-cluster11-readreplica-49891269-19145.rds.cn-east-p1.internal:3331/hive\_cluster11?useUnicode=true&characterEncoding=utf-8&defaultFetchSize=10000&useCursorFetch=true",

#hive, 仅在提供url时候生效

"type":"hive",

# 必填,需要事先知道数据源ID

"datasourceId":"1"

#登记数据源对应的user 非必填

"user":"zhangzhichao",

# 必填 db

"db":"test",

# 必填 table

"table":"xxxx",

# 非必填 tableCnName

"tableCnName":"表中文名称",

# 非必填 note

"note":"备注"

# 非必填 securityLevel

"securityLevel":"1",

# customFields 非必填,

"customFields": {

                "敏感字段": "test1"

                },

"updateStrategy":"PUT\_IF\_ABSENT",            

# 非必填               

"columnInfos":[{

   #必填 X

  "columnName":"test1",

  #非必填 columnCnName

  "columnCnName":"列中文名称",

  #非必填 securityLevel

  "securityLevel":"1",

  #非必填 列备注

  "note":"列note",

  #非必填

  "customFields": {

                "敏感规则": "身份证号"

                  }}]

}

东证传参示例

{

"datasourceId":1031,

"db": "dev",

"table": "test_rgt",

"note":"xxgfasdfsdafa",

"tableCnName":"asdfasdfxcvadfasdfasd",

"columnInfos":[

    {

     "columnName":"1",

    "columnCnName":"1",

     "note":"8",

     },

      {

     "columnName":"2",

    "columnCnName":"2",

    "businessDefine":"2",

     "note":"8"},

      {

     "columnName":"3",

    "columnCnName":"3",

    "sensitiveSign":"5",

     "note":"8"},

     {

     "columnName":"5",

    "columnCnName":"6",

     "note":"8"},

      {

     "columnName":"7",

    "columnCnName":"56",

     "note":"8"}

],

"updateStrategy":"PUT_IF_ABSENT",

"metaDataStatus":"DRAFT"

}

响应体

名称 类型 描述 必传 默认值
code Number 状态码
msg String 错误信息
cost Number 接口消耗毫秒数
reqId String 请求ID
result LogicTableV2 结果
{

  "code":0,

  "msg":"异常会在这个字段里面",

  "cost":10,

  "reqId":"",

  "result":{

  #hive数据源,通过url定位数据源模式必填

"url":"jdbc:mysql://bdms-jd-hive-cluster11-readreplica-49891269-19145.rds.cn-east-p1.internal:3331/hive\_cluster11?useUnicode=true&characterEncoding=utf-8&defaultFetchSize=10000&useCursorFetch=true",

#hive, 仅在提供url时候生效

"type":"hive",

# 必填,需要事先知道数据源ID

"datasourceId":"1"

#登记数据源对应的user 非必填

"user":"zhangzhichao",

# 必填 db

"db":"test",

# 必填 table

"table":"xxxx",

# 非必填 tableCnName

"tableCnName":"表中文名称",

# 非必填 note

"note":"备注"

# 非必填 securityLevel

"securityLevel":"1",

# customFields 非必填,

"customFields": {

                "敏感字段": "test1"

                },

# 非必填               

"columnInfos":\[{

   #必填

  "columnName":"test1",

  #非必填 columnCnName

  "columnCnName":"列中文名称",

  #非必填 securityLevel

  "securityLevel":"1",

  #非必填 列备注

  "note":"列note",

  #非必填

  "customFields": {

                "敏感规则": "身份证号"

                  }}\]

  }

}