查询指定数据集的信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
quickbi-public:QueryDatasetInfo |
get |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| DatasetId |
string |
是 |
数据集唯一 ID。 |
a201c85c-****** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
a4d1a221d-41za1-**** |
| Result |
object |
数据集信息。 |
|
| CubeTableList |
array<object> |
数据集所使用的表的列表。 |
|
|
object |
|||
| Caption |
string |
表的显示名称。 |
odps_40 |
| Customsql |
boolean |
是否是自定义 SQL 表,取值范围:
|
false |
| DatasourceId |
string |
数据源 ID。 |
dfefd7f4-fc6e-42c9-b4****** |
| DsType |
string |
数据源类型,取值范围:
|
maxcompute |
| FactTable |
boolean |
是否是数据源表,取值范围:
|
true |
| Sql |
string |
当为自定义 SQL 表时,此为具体 SQL。 |
select * from **** |
| TableName |
string |
表名称。 |
viewdasb8494aab2612473cb74992159fe**** |
| UniqueId |
string |
表唯一 ID。 |
7a62530b36 |
| CustimzeSql |
boolean |
是否自定义 SQL,取值范围:
|
false |
| DatasetId |
string |
数据集唯一 ID。 |
a201c85c-****** |
| DatasetName |
string |
数据集名称。 |
opds_40 |
| DimensionList |
array<object> |
数据集中所有维度的列表。 |
|
|
object |
数据集中所有维度的列表。 |
||
| Caption |
string |
维度显示名称。 |
city |
| DataType |
string |
数据类型; 取值范围:
|
string |
| DimensionType |
string |
维度类型,取值范围:
|
group_dimension |
| Expression |
string |
计算维度的表达式;仅对计算维度有效。 |
example_expression |
| FactColumn |
string |
实际物理字段。 |
city |
| FieldDescription |
string |
字段描述信息。 |
hhhh |
| Granularity |
string |
粒度。 |
example_granularity |
| RefUid |
string |
分组度量,引用的字段唯一 ID。当且仅当该度量为分组度量时非 NULL。 |
308f7**** |
| TableUniqueId |
string |
所属表的唯一 ID,对应 CubeTypeList 的 UniqueId。 |
7a62530*** |
| Uid |
string |
唯一 ID。 |
a69774*** |
| ExpressionV2 |
string |
平铺的计算维度的表达式。 |
example_expression |
| Directory |
object |
数据集所属目录信息。 |
|
| Id |
string |
目录 ID。 |
a3eecab7-618d-4f9f-***** |
| Name |
string |
目录名称。 |
测试目录 |
| PathId |
string |
目录 ID 的路径,例如:aa/bb/cc/dd。 |
88b680**** |
| PathName |
string |
目录 ID 的路径名称,例如:一层目录/二层目录。 |
测试目录 |
| DsId |
string |
数据源唯一 ID。 |
a201c85c-****** |
| DsName |
string |
数据源名称。 |
odps |
| DsType |
string |
数据源类型,取值范围:
|
odps |
| GmtCreate |
string |
数据集创建时间。 |
1629450382000 |
| GmtModify |
string |
数据集最新修改时间。 |
1629450382000 |
| MeasureList |
array<object> |
数据集所有度量的列表。 |
|
|
object |
|||
| Caption |
string |
度量显示名称。 |
profit_amt |
| DataType |
string |
数据类型; 取值范围:
|
string |
| Expression |
string |
计算度量的表达式;仅对计算度量有效。 |
example_expression |
| FactColumn |
string |
实际物理字段。 |
profit_amt |
| FieldDescription |
string |
字段描述信息。 |
asadsda |
| MeasureType |
string |
度量类型,取值范围:
|
calculate_measure |
| TableUniqueId |
string |
所属表的唯一 ID,对应 CubeTypeList 的 UniqueId。 |
7a62530b36 |
| Uid |
string |
度量唯一 ID。 |
88b680**** |
| ExpressionV2 |
string |
平铺的计算度量的表达式。 |
example_expression |
| OpenOfflineAcceleration |
boolean |
是否开启抽取加速,取值范围:
|
false |
| OwnerId |
string |
数据集所有者在 Quick BI 的用户 ID。 |
b8494aab26124***** |
| OwnerName |
string |
数据集所有者名称。 |
大娃 |
| RowLevel |
boolean |
行级权限是否开启,取值范围:
|
false |
| WorkspaceId |
string |
数据集所属工作空间唯一 ID。 |
420abef4-a79b-4289-b12**** |
| WorkspaceName |
string |
数据集所处空间名称。 |
测试空间 |
| Success |
boolean |
接口是否成功返回,取值范围:
|
true |
示例
正常返回示例
JSON格式
{
"RequestId": "a4d1a221d-41za1-****",
"Result": {
"CubeTableList": [
{
"Caption": "odps_40",
"Customsql": false,
"DatasourceId": "dfefd7f4-fc6e-42c9-b4******",
"DsType": "maxcompute",
"FactTable": true,
"Sql": "select * from ****",
"TableName": "viewdasb8494aab2612473cb74992159fe****",
"UniqueId": "7a62530b36"
}
],
"CustimzeSql": false,
"DatasetId": "a201c85c-******",
"DatasetName": "opds_40",
"DimensionList": [
{
"Caption": "city",
"DataType": "string",
"DimensionType": "group_dimension",
"Expression": "example_expression",
"FactColumn": "city",
"FieldDescription": "hhhh",
"Granularity": "example_granularity",
"RefUid": "308f7****",
"TableUniqueId": "7a62530***",
"Uid": "a69774***",
"ExpressionV2": "example_expression"
}
],
"Directory": {
"Id": "a3eecab7-618d-4f9f-*****",
"Name": "测试目录",
"PathId": "88b680****",
"PathName": "测试目录"
},
"DsId": "a201c85c-******",
"DsName": "odps",
"DsType": "odps",
"GmtCreate": "1629450382000",
"GmtModify": "1629450382000",
"MeasureList": [
{
"Caption": "profit_amt",
"DataType": "string",
"Expression": "example_expression",
"FactColumn": "profit_amt",
"FieldDescription": "asadsda",
"MeasureType": "calculate_measure",
"TableUniqueId": "7a62530b36",
"Uid": "88b680****",
"ExpressionV2": "example_expression"
}
],
"OpenOfflineAcceleration": false,
"OwnerId": "b8494aab26124*****",
"OwnerName": "大娃",
"RowLevel": false,
"WorkspaceId": "420abef4-a79b-4289-b12****",
"WorkspaceName": "测试空间"
},
"Success": true
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | Cube.Not.Exist | The Cube does not exist. | 数据集不存在。 |
| 400 | Not.WorkspaceCube.Error | You can only use the %s dataset of the current workspace. | 只能使用当前工作空间的数据集。 |
| 400 | Decryption.Error | An error occurred while decoding. | 解密失败。 |
| 400 | Datasource.UserPermission.Error | You do not have datasource authorization. | 当前用户没有数据源权限。 |
| 400 | CubeMeta.ToXml.Error | An error occurred while converting the data object to the XML format. | 数据对象转换XML失败。 |
| 400 | Datasource.NotFound.Error | The specified data source does not exist: %s. | 数据源不存在:%s。 |
| 400 | Cube.ParseToXml.Error | An error occurred while parsing a dataset object to XML format. | 将多维数据集对象解析为XML错误。 |
| 400 | DatasourceId.IsNull.Error | You must select a data source before selecting the table. | 必须选择数据源之后再选择表。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。