查询数据集详情
接口说明
本接口是用于在指标平台中查询数据集的详情。
接口URL
GET Http://{anymetrics_host:anymetrics_port}/anymetrics/api/v1/dataset/info?name=tb_user_api_2
anymetrics_host:anymetrics_port 获取方式请参考:调用方式
公共请求参数
| 参数 | 类型 | 是否必选 | 最大长度 | 描述 | 示例值 |
| tenant-id | String | 是 | 32 | 当前租户 ID | tn_125288 |
| auth-type | String | 是 | 32 | 身份类型,UID/TOKEN | UID |
| auth-value | String | 是 | 32 | UID 或者TOKEN 值 | 341523017135816704 |
公共参数获取方式
tenant-id 与 auth-value:在 Aloudata CAN 顶部导航栏选择指标应用,左边菜单栏选择 API 集成。在 API 集成界面获取取到tenant-id 与auth-value。

请求参数
| 参数 | 类型 | 是否必选 | 最大长度 | 描述 | 示例值 |
|---|---|---|---|---|---|
| name | String | 是 | 128 | 数据集名称 | datasetName |
相应参数
1. 基础信息表
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| data | Array | 是 | 详细内容请参见:data 参数说明 |
| success | Boolean | 是 | 请求是否成功 |
| code | String | 是 | 状态码(如"200") |
| errorMsg | String | 否 | 错误信息(失败时返回) |
| detailErrorMsg | String | 否 | 详细错误信息 |
| traceId | String | 是 | 请求追踪ID |
2. data 参数说明
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| name | String | 是 | 数据集名称(如"p_order") |
| displayName | String | 是 | 数据集显示名称 |
| description | String | 否 | 数据集描述 |
| sourceInfo | Array | 是 | 数据源详情,详情见:sourceInfo 参数说明 |
| columns | Array | 是 | 详情请见:columns 参数说明 |
| defColumns | Array | 是 | |
| relations | Array | 是 | 关联关系 |
| relationFroms | Array | 是 | 关联关系,详情请见:relationFroms 参数说明 |
| resourceId | String | 是 | 数据集资源ID(如"p_order") |
| userPrivilegeResultDTO | Array | 是 | 权限详情,详情请见 userPrivilegeResultDTO 参数说明 |
| createTime | Long | 是 | 创建时间戳(如1721567197373) |
| updateTime | Long | 是 | 更新时间戳(如1739931491771) |
| userId | String | 是 | 用户 ID |
| partitionMapping | Array | 是 | 分区信息,详情见 partitionMapping 参数说明 |
| approvalMutationStatus | String | 是 | 审批变更状态 |
| approvalAuthorityStatus | String | 是 | 审批权限状态 |
| owner | Array | 是 | 详情见 owner 参数说明 |
3.partitionMapping 参数说明
| 参数名 | 类型 | 必填 | 说明 | 示例值/枚举值 |
|---|---|---|---|---|
| partitionColumnName | String | 是 | 分区列字段名 | "dt" |
| sourceTableGuid | String | 否 | sql 中引用的源头表的 guid | "fl_sr1.default_catalog.aloudatacan.fly_order_partition" |
| sourceColumnName | String | 否 | sql 中引用的源头表的分区字段名称 | "dt" |
| dateGranularity | String | 否 | 日期分区粒度 | "DAY" |
| columnPartitionMappings | Object[] | 否 | 列级分区映射配置 | 详情参见:columnPartitionMappings 参数说明 |
4.columnPartitionMappings 参数说明
| 参数名 | 类型 | 必填 | 说明 | 示例值/枚举值 |
|---|---|---|---|---|
| columnName | String | 是 | 普通日期字段的名称 | |
| interval | Intger | 是 | 偏移量 | 1 |
| sign | String | 是 | 偏移量符号,POSITIVE:正号。NEGATIVE:负号 | POSITIVE |
5.owner 参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| userId | String | 所有者用户ID |
| nickname | String | 所有者昵称 |
6. sourceInfo 参数说明
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| content | String | 是 | 数据源完整路径,如:jmsr.default_catalog.partition_test.p_order |
| type | String | 是 | 资源类型 |
| datasourceItems | Object[] | 是 | 数据源引擎信息 |
7.columns 参数说明
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| name | String | 是 | 列名"order_id" |
| originDataType | String | 是 | 原始数据类型枚举:INT/DATE/VARCHAR/DOUBLE |
| type | String | 是 | 列角色。DIMENSION(维度)或MEASURE(指标)DIMENSION(维度)或MEASURE(指标) |
| isPartition | Boolean | 否 | 是否分区列仅分区列如dt为true |
| dimension | Object | 否 | 维度特有属性包含originalDataType等字段(当type=DIMENSION时存在) |
8.relationFroms 参数说明
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| id | Intger | 是 | 关联关系 id |
| type | String | 是 | 关联类型,如:"MANY_TO_ONE" |
| srcDatasetName | String | 是 | 源数据集,如:"p_express" |
| dstDatasetName | String | 是 | 目标数据集,如:"p_order" |
| relationConditions | Object[] | 是 | 关联条件,如:每项包含srcExpr(如"['p_express'/'order_id']")和dstExpr字段 |
9. userPrivilegeResultDTO 参数说明
| 参数名 | 类型 | 必填 | 说明 | 示例值/枚举值 |
|---|---|---|---|---|
| resourceDTO | Object | 是 | 关联的资源信息 | 见子表 |
| cloudAccount | String | 是 | 云账号标识 | "3itf4r1k2xvk@aloudata.com" |
| accountType | String | 是 | 账号类型 | "USER" |
| authorityRole | String | 是 | 用户权限角色 | "OWNER" |
| grantTime | Long | 否 | 权限授予时间戳(毫秒) | null |
| expiredTime | Long | 否 | 权限过期时间戳(毫秒) | null |
| authoritySource | String | 是 | 权限来源 | "DIRECT" |
| canCreateResources | String[] | 是 | 可创建的资源类型列表 | ["CATEGORY_METRIC", "DATASET"] |
| canEdit | Boolean | 是 | 是否有编辑权限 | true |
| canDelete | Boolean | 是 | 是否有删除权限 | true |
| canUsage | Boolean | 是 | 是否有使用权限 | true |
| canAuth | Boolean | 是 | 是否有授权权限 | true |
| canTransfer | Boolean | 是 | 是否有转移权限 | true |
| authRoleList | String[] | 是 | 可授予的角色列表 | ["ADMIN", "USAGER"] |
| resourceType | String | 是 | 资源类型(固定值) | "DATASET" |
| resourceId | String | 是 | 资源ID(与顶级resourceId重复) |
"p_order" |
10.resourceDTO 参数说明
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| resourceType | String | 是 | 同顶级resourceType |
| resourceId | String | 是 | 同顶级resourceId |
| resourceName | String | 否 | 资源显示名称 |
请求示例
curl --location --request GET 'http://127.0.0.1:8083/anymetrics/api/v1/dataset/info?name=p_order' \
--header 'auth-type: UID' \
--header 'tenant-id: tn_19487697' \
--header 'auth-value: 463663891121963008' \
--header 'Accept-Language: zh-CN' \
响应内容
{
"data": {
"name": "p_order",
"displayName": "p_order",
"description": "",
"sourceInfo": {
"id": null,
"name": "p_order",
"displayName": "p_order",
"columns": [
{
"name": "dt",
"displayName": null,
"description": "dt",
"originDataType": "DATE",
"isPartition": true,
"isFirstPartition": null
},
{
"name": "order_id",
"displayName": null,
"description": "order_id",
"originDataType": "INT",
"isPartition": false,
"isFirstPartition": null
},
{
"name": "order_amt",
"displayName": null,
"description": "order_amt",
"originDataType": "DOUBLE",
"isPartition": false,
"isFirstPartition": null
},
{
"name": "order_date",
"displayName": null,
"description": "order_date",
"originDataType": "DATE",
"isPartition": false,
"isFirstPartition": null
},
{
"name": "description",
"displayName": null,
"description": "description",
"originDataType": "VARCHAR",
"isPartition": false,
"isFirstPartition": null
},
{
"name": "user_id",
"displayName": null,
"description": "user_id",
"originDataType": "INT",
"isPartition": false,
"isFirstPartition": null
},
{
"name": "product_id",
"displayName": null,
"description": "product_id",
"originDataType": "INT",
"isPartition": false,
"isFirstPartition": null
},
{
"name": "seller_id",
"displayName": null,
"description": "seller_id",
"originDataType": "INT",
"isPartition": false,
"isFirstPartition": null
},
{
"name": "region",
"displayName": null,
"description": "region",
"originDataType": "VARCHAR",
"isPartition": false,
"isFirstPartition": null
}
],
"description": "",
"content": "jmsr.`default_catalog.partition_test`.p_order",
"type": "TABLE",
"catalogs": null,
"datasourceItems": [
{
"id": "jmsr",
"name": "jmsR",
"queryEngineType": "STARROCKS"
}
],
"resourceType": "TABLE",
"resourceId": "jmsr.`default_catalog.partition_test`.p_order"
},
"columns": [
{
"name": "dt",
"displayName": "dt",
"description": "dt",
"type": "DIMENSION",
"isHidden": false,
"originDataType": "DATE",
"isPartition": true,
"isFirstPartition": null,
"isPrimaryKey": null,
"sourceColumn": "dt",
"ast": {
"extType": null,
"type": "NAME_REF",
"path": [
"p_order",
"dt"
],
"op": null,
"args": null,
"val": null,
"x": null,
"y": null,
"formula": null,
"partitionList": null,
"orderList": null,
"isDesc": null,
"position": null
},
"expr": "['p_order'/'dt']",
"dimension": {
"name": "80a2a1257a78445d873b64c2c67ec76e",
"displayName": "dt",
"ownerId": "463663891121963008",
"originalDataType": "DATE"
}
},
{
"name": "order_id",
"displayName": "order_id",
"description": "order_id",
"type": "MEASURE",
"isHidden": false,
"originDataType": "INT",
"isPartition": null,
"isFirstPartition": null,
"isPrimaryKey": null,
"sourceColumn": "order_id",
"ast": {
"extType": null,
"type": "NAME_REF",
"path": [
"p_order",
"order_id"
],
"op": null,
"args": null,
"val": null,
"x": null,
"y": null,
"formula": null,
"partitionList": null,
"orderList": null,
"isDesc": null,
"position": null
},
"expr": "['p_order'/'order_id']",
"dimension": null
},
{
"name": "order_amt",
"displayName": "order_amt",
"description": "order_amt",
"type": "MEASURE",
"isHidden": false,
"originDataType": "DOUBLE",
"isPartition": null,
"isFirstPartition": null,
"isPrimaryKey": null,
"sourceColumn": "order_amt",
"ast": {
"extType": null,
"type": "NAME_REF",
"path": [
"p_order",
"order_amt"
],
"op": null,
"args": null,
"val": null,
"x": null,
"y": null,
"formula": null,
"partitionList": null,
"orderList": null,
"isDesc": null,
"position": null
},
"expr": "['p_order'/'order_amt']",
"dimension": null
},
{
"name": "order_date",
"displayName": "order_date",
"description": "order_date",
"type": "DIMENSION",
"isHidden": false,
"originDataType": "DATE",
"isPartition": null,
"isFirstPartition": null,
"isPrimaryKey": null,
"sourceColumn": "order_date",
"ast": {
"extType": null,
"type": "NAME_REF",
"path": [
"p_order",
"order_date"
],
"op": null,
"args": null,
"val": null,
"x": null,
"y": null,
"formula": null,
"partitionList": null,
"orderList": null,
"isDesc": null,
"position": null
},
"expr": "['p_order'/'order_date']",
"dimension": {
"name": "ad1bac4b3d4a458ab9700dc15934236e",
"displayName": "order_date",
"ownerId": "463663891121963008",
"originalDataType": "DATE"
}
},
{
"name": "description",
"displayName": "description",
"description": "description",
"type": "DIMENSION",
"isHidden": false,
"originDataType": "VARCHAR",
"isPartition": null,
"isFirstPartition": null,
"isPrimaryKey": null,
"sourceColumn": "description",
"ast": {
"extType": null,
"type": "NAME_REF",
"path": [
"p_order",
"description"
],
"op": null,
"args": null,
"val": null,
"x": null,
"y": null,
"formula": null,
"partitionList": null,
"orderList": null,
"isDesc": null,
"position": null
},
"expr": "['p_order'/'description']",
"dimension": {
"name": "7505fc7590b840378490ccc115e6b783",
"displayName": "description",
"ownerId": "463663891121963008",
"originalDataType": "VARCHAR"
}
},
{
"name": "user_id",
"displayName": "user_id",
"description": "user_id",
"type": "MEASURE",
"isHidden": false,
"originDataType": "INT",
"isPartition": null,
"isFirstPartition": null,
"isPrimaryKey": null,
"sourceColumn": "user_id",
"ast": {
"extType": null,
"type": "NAME_REF",
"path": [
"p_order",
"user_id"
],
"op": null,
"args": null,
"val": null,
"x": null,
"y": null,
"formula": null,
"partitionList": null,
"orderList": null,
"isDesc": null,
"position": null
},
"expr": "['p_order'/'user_id']",
"dimension": null
},
{
"name": "product_id",
"displayName": "product_id",
"description": "product_id",
"type": "MEASURE",
"isHidden": false,
"originDataType": "INT",
"isPartition": null,
"isFirstPartition": null,
"isPrimaryKey": null,
"sourceColumn": "product_id",
"ast": {
"extType": null,
"type": "NAME_REF",
"path": [
"p_order",
"product_id"
],
"op": null,
"args": null,
"val": null,
"x": null,
"y": null,
"formula": null,
"partitionList": null,
"orderList": null,
"isDesc": null,
"position": null
},
"expr": "['p_order'/'product_id']",
"dimension": null
},
{
"name": "seller_id",
"displayName": "seller_id",
"description": "seller_id",
"type": "MEASURE",
"isHidden": false,
"originDataType": "INT",
"isPartition": null,
"isFirstPartition": null,
"isPrimaryKey": null,
"sourceColumn": "seller_id",
"ast": {
"extType": null,
"type": "NAME_REF",
"path": [
"p_order",
"seller_id"
],
"op": null,
"args": null,
"val": null,
"x": null,
"y": null,
"formula": null,
"partitionList": null,
"orderList": null,
"isDesc": null,
"position": null
},
"expr": "['p_order'/'seller_id']",
"dimension": null
},
{
"name": "region",
"displayName": "region",
"description": "region",
"type": "DIMENSION",
"isHidden": false,
"originDataType": "VARCHAR",
"isPartition": null,
"isFirstPartition": null,
"isPrimaryKey": null,
"sourceColumn": "region",
"ast": {
"extType": null,
"type": "NAME_REF",
"path": [
"p_order",
"region"
],
"op": null,
"args": null,
"val": null,
"x": null,
"y": null,
"formula": null,
"partitionList": null,
"orderList": null,
"isDesc": null,
"position": null
},
"expr": "['p_order'/'region']",
"dimension": {
"name": "5f6066691dac4aa480c147565648254c",
"displayName": "region",
"ownerId": "463663891121963008",
"originalDataType": "VARCHAR"
}
}
],
"defColumns": [
{
"name": "dt",
"displayName": "dt",
"description": "dt",
"type": "DIMENSION",
"isHidden": false,
"originDataType": "DATE",
"isPartition": true,
"isFirstPartition": null,
"isPrimaryKey": null,
"sourceColumn": "dt",
"ast": {
"extType": null,
"type": "NAME_REF",
"path": [
"p_order",
"dt"
],
"op": null,
"args": null,
"val": null,
"x": null,
"y": null,
"formula": null,
"partitionList": null,
"orderList": null,
"isDesc": null,
"position": null
},
"expr": "['p_order'/'dt']",
"dimension": {
"name": "80a2a1257a78445d873b64c2c67ec76e",
"displayName": "dt",
"ownerId": "463663891121963008",
"originalDataType": "DATE"
}
},
{
"name": "order_id",
"displayName": "order_id",
"description": "order_id",
"type": "MEASURE",
"isHidden": false,
"originDataType": "INT",
"isPartition": null,
"isFirstPartition": null,
"isPrimaryKey": null,
"sourceColumn": "order_id",
"ast": {
"extType": null,
"type": "NAME_REF",
"path": [
"p_order",
"order_id"
],
"op": null,
"args": null,
"val": null,
"x": null,
"y": null,
"formula": null,
"partitionList": null,
"orderList": null,
"isDesc": null,
"position": null
},
"expr": "['p_order'/'order_id']",
"dimension": null
},
{
"name": "order_amt",
"displayName": "order_amt",
"description": "order_amt",
"type": "MEASURE",
"isHidden": false,
"originDataType": "DOUBLE",
"isPartition": null,
"isFirstPartition": null,
"isPrimaryKey": null,
"sourceColumn": "order_amt",
"ast": {
"extType": null,
"type": "NAME_REF",
"path": [
"p_order",
"order_amt"
],
"op": null,
"args": null,
"val": null,
"x": null,
"y": null,
"formula": null,
"partitionList": null,
"orderList": null,
"isDesc": null,
"position": null
},
"expr": "['p_order'/'order_amt']",
"dimension": null
},
{
"name": "order_date",
"displayName": "order_date",
"description": "order_date",
"type": "DIMENSION",
"isHidden": false,
"originDataType": "DATE",
"isPartition": null,
"isFirstPartition": null,
"isPrimaryKey": null,
"sourceColumn": "order_date",
"ast": {
"extType": null,
"type": "NAME_REF",
"path": [
"p_order",
"order_date"
],
"op": null,
"args": null,
"val": null,
"x": null,
"y": null,
"formula": null,
"partitionList": null,
"orderList": null,
"isDesc": null,
"position": null
},
"expr": "['p_order'/'order_date']",
"dimension": {
"name": "ad1bac4b3d4a458ab9700dc15934236e",
"displayName": "order_date",
"ownerId": "463663891121963008",
"originalDataType": "DATE"
}
},
{
"name": "description",
"displayName": "description",
"description": "description",
"type": "DIMENSION",
"isHidden": false,
"originDataType": "VARCHAR",
"isPartition": null,
"isFirstPartition": null,
"isPrimaryKey": null,
"sourceColumn": "description",
"ast": {
"extType": null,
"type": "NAME_REF",
"path": [
"p_order",
"description"
],
"op": null,
"args": null,
"val": null,
"x": null,
"y": null,
"formula": null,
"partitionList": null,
"orderList": null,
"isDesc": null,
"position": null
},
"expr": "['p_order'/'description']",
"dimension": {
"name": "7505fc7590b840378490ccc115e6b783",
"displayName": "description",
"ownerId": "463663891121963008",
"originalDataType": "VARCHAR"
}
},
{
"name": "user_id",
"displayName": "user_id",
"description": "user_id",
"type": "MEASURE",
"isHidden": false,
"originDataType": "INT",
"isPartition": null,
"isFirstPartition": null,
"isPrimaryKey": null,
"sourceColumn": "user_id",
"ast": {
"extType": null,
"type": "NAME_REF",
"path": [
"p_order",
"user_id"
],
"op": null,
"args": null,
"val": null,
"x": null,
"y": null,
"formula": null,
"partitionList": null,
"orderList": null,
"isDesc": null,
"position": null
},
"expr": "['p_order'/'user_id']",
"dimension": null
},
{
"name": "product_id",
"displayName": "product_id",
"description": "product_id",
"type": "MEASURE",
"isHidden": false,
"originDataType": "INT",
"isPartition": null,
"isFirstPartition": null,
"isPrimaryKey": null,
"sourceColumn": "product_id",
"ast": {
"extType": null,
"type": "NAME_REF",
"path": [
"p_order",
"product_id"
],
"op": null,
"args": null,
"val": null,
"x": null,
"y": null,
"formula": null,
"partitionList": null,
"orderList": null,
"isDesc": null,
"position": null
},
"expr": "['p_order'/'product_id']",
"dimension": null
},
{
"name": "seller_id",
"displayName": "seller_id",
"description": "seller_id",
"type": "MEASURE",
"isHidden": false,
"originDataType": "INT",
"isPartition": null,
"isFirstPartition": null,
"isPrimaryKey": null,
"sourceColumn": "seller_id",
"ast": {
"extType": null,
"type": "NAME_REF",
"path": [
"p_order",
"seller_id"
],
"op": null,
"args": null,
"val": null,
"x": null,
"y": null,
"formula": null,
"partitionList": null,
"orderList": null,
"isDesc": null,
"position": null
},
"expr": "['p_order'/'seller_id']",
"dimension": null
},
{
"name": "region",
"displayName": "region",
"description": "region",
"type": "DIMENSION",
"isHidden": false,
"originDataType": "VARCHAR",
"isPartition": null,
"isFirstPartition": null,
"isPrimaryKey": null,
"sourceColumn": "region",
"ast": {
"extType": null,
"type": "NAME_REF",
"path": [
"p_order",
"region"
],
"op": null,
"args": null,
"val": null,
"x": null,
"y": null,
"formula": null,
"partitionList": null,
"orderList": null,
"isDesc": null,
"position": null
},
"expr": "['p_order'/'region']",
"dimension": {
"name": "5f6066691dac4aa480c147565648254c",
"displayName": "region",
"ownerId": "463663891121963008",
"originalDataType": "VARCHAR"
}
}
],
"relations": [],
"relationFroms": [
{
"id": "438",
"type": "MANY_TO_ONE",
"srcDatasetName": "p_express",
"srcDatasetDisplayName": null,
"dstDatasetName": "p_order",
"dstDatasetDisplayName": null,
"relationConditions": [
{
"srcAst": "{\"path\":[\"p_express\",\"order_id\"],\"type\":\"NAME_REF\"}",
"srcExpr": "['tn_19487697_jmsr.default.p_express'/'order_id']",
"dstAst": "{\"path\":[\"p_order\",\"order_id\"],\"type\":\"NAME_REF\"}",
"dstExpr": "['tn_19487697_jmsr.default.p_order'/'order_id']"
}
],
"partitionConfig": null,
"filters": "null",
"userId": "463663891121963008",
"createTime": 1731059622612,
"updateTime": 1731059622612
}
],
"resourceId": "p_order",
"userPrivilegeResultDTO": {
"id": null,
"resourceDTO": {
"resourceType": "DATASET",
"resourceId": "p_order",
"resourceName": null
},
"cloudAccount": "3itf4r1k2xvk@aloudata.com",
"accountType": "USER",
"authorityRole": "OWNER",
"grantTime": null,
"expiredTime": null,
"authoritySource": "DIRECT",
"extendResourceDTO": null,
"canCreateResources": [
"CATEGORY_METRIC",
"CATEGORY_DATASET",
"METRIC",
"DATASET",
"RESULT_PLAN",
"CATEGORY_RESULT_PLAN"
],
"canEdit": true,
"canDelete": true,
"canUsage": true,
"canAuth": true,
"canTransfer": true,
"authRoleList": [
"ADMIN",
"USAGER"
],
"resourceType": "DATASET",
"resourceId": "p_order"
},
"createTime": 1721567197373,
"updateTime": 1739931491771,
"userId": null,
"partitionMapping": {
"partitionColumnName": "dt",
"sourceTableGuid": null,
"sourceColumnName": null,
"dateGranularity": "DAY",
"columnPartitionMappings": []
},
"approvalMutationStatus": null,
"approvalAuthorityStatus": null,
"owner": {
"userId": "463663891121963008",
"nickname": "CAN_A"
}
},
"success": true,
"code": "200",
"errorMsg": null,
"detailErrorMsg": null,
"traceId": "e449a5b9f9f14aa1915d11bf1e158409.188.17524622866271699"
}