元数据检索。
接口说明
元数据检索
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
dlf:Search |
get |
*全部资源
|
无 | 无 |
请求语法
POST /api/metastore/catalogs/search HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| body |
object |
否 |
A short description of struct |
|
| CatalogId |
string |
否 |
catalogid |
1344371 |
| SearchText |
string |
否 |
搜索问题 |
tags:tag1 or comment:^iso and name=aliyun and (createTime > "20211111" and createTime < "20211117") and has category |
| SortCriteria |
array |
否 |
排序结构 |
|
| SortCriterion |
否 |
排序结构 |
||
| PageSize |
integer |
否 |
当前查询的页大小 |
1000 |
| PageNumber |
integer |
否 |
当前查询的页号 |
1 |
| SearchType |
string |
否 |
搜索类型 枚举值:
|
TABLE/DATABASE/CATALOG |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| Code |
string |
响应代码 |
OK |
| Message |
string |
响应消息 |
"" |
| RequestId |
string |
请求 ID |
460C862F-BB91-5C04-BC3F-946EEF467862 |
| Success |
boolean |
是否成功 |
True |
| DatabaseResult |
object |
返回的 db 结果 |
|
| Databases |
array<object> |
返回的 DatabaseList |
|
|
object |
数据库信息 |
||
| Database | Database |
返回的 Database |
|
| HighLightList |
array |
返回高亮文本 |
|
| HighLight |
返回高亮文本 |
||
| TotalCount |
integer |
满足匹配条件的总的 Database 个数 |
11000 |
| TableResult |
object |
返回的 table result |
|
| Tables |
array<object> |
返回的 TableList |
|
|
object |
元数据表 |
||
| Table | Table |
返回的 Table |
|
| HighLightList |
array |
返回的高亮文本 |
|
| HighLight |
返回的高亮文本 |
||
| TotalCount |
integer |
满足匹配条件的总的 Table 个数 |
1100 |
示例
正常返回示例
JSON格式
{
"Code": "OK",
"Message": "\"\"",
"RequestId": "460C862F-BB91-5C04-BC3F-946EEF467862",
"Success": true,
"DatabaseResult": {
"Databases": [
{
"Database": {
"CreateTime": 1608707407,
"Description": "this is a hive database",
"LocationUri": "/hdfs/hivedb/data",
"Name": "database_test",
"OwnerName": "zhangsan",
"OwnerType": "USER",
"Parameters": {
"key": "key"
},
"Privileges": {
"GroupPrivileges": {
"key": [
{
"CreateTime": 1606226844,
"GrantOption": true,
"Grantor": "Grantor",
"GrantorType": "GrantorType",
"Privilege": "Privilege"
}
]
},
"RolePrivileges": {
"key": [
{
"CreateTime": 1606226844,
"GrantOption": true,
"Grantor": "Grantor",
"GrantorType": "GrantorType",
"Privilege": "Privilege"
}
]
},
"UserPrivileges": {
"key": [
{
"CreateTime": 1606226844,
"GrantOption": true,
"Grantor": "Grantor",
"GrantorType": "GrantorType",
"Privilege": "Privilege"
}
]
}
},
"UpdateTime": 1608707407,
"CreatedBy": "root"
},
"HighLightList": [
{
"Key": "name",
"Value": "tab2"
}
]
}
],
"TotalCount": 11000
},
"TableResult": {
"Tables": [
{
"Table": {
"Cascade": false,
"CreateTime": 1608707407,
"CreatedBy": "zhangsan",
"DatabaseName": "database_test",
"LastAccessTime": 1608707407,
"LastAnalyzedTime": 1608707407,
"Owner": "zhangsan",
"OwnerType": "USER",
"Parameters": {
"key": "key"
},
"PartitionKeys": [
{
"Comment": "comment_day",
"Name": "day",
"Parameters": {
"key": "key"
},
"Type": "int"
}
],
"Privileges": {},
"Retention": 30000,
"RewriteEnabled": true,
"Sd": {
"BucketCols": [
"2010"
],
"Cols": [
{
"Comment": "comment_day",
"Name": "day",
"Type": "int"
}
],
"Compressed": false,
"InputFormat": "org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat",
"Location": "file:///tmp/table",
"NumBuckets": 10,
"OutputFormat": "org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat",
"Parameters": {
"key": "key"
},
"SerDeInfo": {
"Name": "name",
"SerializationLib": "org.apache.hadoop.hive.serde2.OpenCSVSerde"
},
"SkewedInfo": {
"SkewedColNames": [
"col1"
],
"SkewedColValueLocationMaps": {
"key": "{“col1”:\"val1\"}"
},
"SkewedColValues": [
[
"\"123\""
]
]
},
"SortCols": [
{
"Col": "col1",
"Order": 1
}
],
"StoredAsSubDirectories": false
},
"TableName": "table_name",
"TableType": "MANAGED_TABLE",
"Temporary": false,
"UpdateTime": 1608707407,
"ViewExpandedText": "''",
"ViewOriginalText": "''",
"TableId": "59c6c8fefeaa46d8b599c1f790c59a19",
"TableVersion": {
"Table": {
"Cascade": false,
"CreateTime": 1608707407,
"CreatedBy": "zhangsan",
"DatabaseName": "database_test",
"LastAccessTime": 1608707407,
"LastAnalyzedTime": 1608707407,
"Owner": "zhangsan",
"OwnerType": "USER",
"PartitionKeys": [
{
"Comment": "comment_day",
"Name": "day",
"Type": "int"
}
],
"Privileges": {},
"Retention": 30000,
"RewriteEnabled": true,
"Sd": {
"BucketCols": [
"2010"
],
"Cols": [],
"Compressed": false,
"InputFormat": "org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat",
"Location": "file:///tmp/table",
"NumBuckets": 10,
"OutputFormat": "org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat",
"Parameters": {
"key": "key"
},
"SerDeInfo": {
"Name": "name",
"SerializationLib": "org.apache.hadoop.hive.serde2.OpenCSVSerde"
},
"SkewedInfo": {
"SkewedColNames": [
"col1"
],
"SkewedColValueLocationMaps": {
"key": "{“col1”:\"val1\"}"
},
"SkewedColValues": [
[
"\"123\""
]
]
},
"SortCols": [
{
"Col": "col1",
"Order": 1
}
],
"StoredAsSubDirectories": false
},
"TableName": "table_name",
"TableType": "MANAGED_TABLE",
"Temporary": false,
"UpdateTime": 1608707407,
"ViewExpandedText": "''",
"ViewOriginalText": "''",
"TableId": "59c6c8fefeaa46d8b599c1f790c59a19",
"TableVersion": {
"Table": {
"Cascade": false,
"CreateTime": 1608707407,
"CreatedBy": "zhangsan",
"DatabaseName": "database_test",
"LastAccessTime": 1608707407,
"LastAnalyzedTime": 1608707407,
"Owner": "zhangsan",
"OwnerType": "USER",
"PartitionKeys": [],
"Retention": 30000,
"RewriteEnabled": true,
"Sd": {
"BucketCols": [
"2010"
],
"Cols": [],
"Compressed": false,
"InputFormat": "org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat",
"Location": "file:///tmp/table",
"NumBuckets": 10,
"OutputFormat": "org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat",
"Parameters": {
"key": "key"
},
"SerDeInfo": {
"Name": "name",
"SerializationLib": "org.apache.hadoop.hive.serde2.OpenCSVSerde"
},
"SkewedInfo": {
"SkewedColNames": [
"col1"
],
"SkewedColValueLocationMaps": {
"key": "{“col1”:\"val1\"}"
},
"SkewedColValues": [
[
"\"123\""
]
]
},
"SortCols": [
{
"Col": "col1",
"Order": 1
}
],
"StoredAsSubDirectories": false
},
"TableName": "table_name",
"TableType": "MANAGED_TABLE",
"Temporary": false,
"UpdateTime": 1608707407,
"ViewExpandedText": "''",
"ViewOriginalText": "''",
"TableId": "59c6c8fefeaa46d8b599c1f790c59a19",
"TableVersion": {
"VersionId": 5
}
},
"VersionId": 5
}
},
"VersionId": 5
}
},
"HighLightList": [
{
"Key": "name",
"Value": "tab2"
}
]
}
],
"TotalCount": 1100
}
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。