Searches for databases, tables, and columns across catalogs.
Try it now
Test
RAM authorization
Action | Access level | Resource type | Condition key | Dependent action |
dlf:SearchAcrossCatalog | *All Resource
| None | None |
Request syntax
POST /api/metastore/catalogs/search/search-across-catalog HTTP/1.1Request parameters
Parameter | Type | Required | Description | Example |
| body | object | No | The request body. | |
SearchText | string | No | The search query. | tags:tag1 or comment:^iso and name=aliyun and (createTime > "20211111" and createTime < "20211117") and has category |
| SortCriteria | array | No | The sorting criteria. | |
No | The sorting criteria. | |||
PageSize | integer | No | The number of entries to return per page. | 1000 |
PageNumber | integer | No | The page number to return. | 1 |
CatalogIds | No | The catalog IDs. If this parameter is not specified, all catalogs are searched. | ||
SearchTypes | No | The search types. Valid values: ALL, CATALOG, DATABASE, and TABLE. |
Response elements
Element | Type | Description | Example |
object | The response body. | ||
Code | string | The response code. | OK |
Message | string | The response message. | "" |
RequestId | string | The request ID. | 460C862F-BB91-5C04-BC3F-946EEF467862 |
Success | boolean | Indicates whether the request was successful. | True |
| DatabaseResult | object | The database search results. | |
| Databases | array<object> | The databases. | |
object | Database information. | ||
Database | The database. | ||
| HighLightList | array | The highlighted text. | |
HighLight | The highlighted text. | ||
TotalCount | integer | The total number of databases that match the search criteria. | 11000 |
| TableResult | object | The table search results. | |
| Tables | array<object> | The tables. | |
object | The structure of the table result. | ||
Table | The table. | ||
| HighLightList | array | The highlighted text. | |
HighLight | The highlighted text. | ||
TotalCount | integer | The total number of tables that match the search criteria. | 1100 |
| CatalogResult | object | The catalog search results. | |
| Catalogs | array<object> | The catalogs. | |
object | The catalog details. | ||
Catalog | The catalog details. | ||
| HighLightList | array | The highlighted text. | |
HighLight | Highlighted text. | ||
TotalCount | integer | The total number of catalogs that match the search criteria. | 100 |
Examples
Success response
JSON format
{
"Code": "OK",
"Message": "\"\"",
"RequestId": "460C862F-BB91-5C04-BC3F-946EEF467862",
"Success": true,
"DatabaseResult": {
"Databases": [
{
"Database": {
"CreateTime": 0,
"Description": "",
"LocationUri": "oss://examplebuket/exampledb",
"Name": "",
"OwnerName": "",
"OwnerType": "",
"Parameters": {
"key": ""
},
"Privileges": {
"GroupPrivileges": {
"key": [
{
"CreateTime": 0,
"GrantOption": true,
"Grantor": "",
"GrantorType": "",
"Privilege": ""
}
]
},
"RolePrivileges": {
"key": [
{
"CreateTime": 0,
"GrantOption": true,
"Grantor": "",
"GrantorType": "",
"Privilege": ""
}
]
},
"UserPrivileges": {
"key": [
{
"CreateTime": 0,
"GrantOption": true,
"Grantor": "",
"GrantorType": "",
"Privilege": ""
}
]
}
},
"UpdateTime": 0,
"CreatedBy": ""
},
"HighLightList": [
{
"Key": "name",
"Value": "tab2"
}
]
}
],
"TotalCount": 11000
},
"TableResult": {
"Tables": [
{
"Table": {
"Cascade": true,
"CreateTime": 0,
"CreatedBy": "",
"DatabaseName": "",
"LastAccessTime": 0,
"LastAnalyzedTime": 0,
"Owner": "",
"OwnerType": "",
"Parameters": {
"key": ""
},
"PartitionKeys": [
{
"Comment": "",
"Name": "",
"Parameters": {
"key": ""
},
"Type": ""
}
],
"Privileges": {},
"Retention": 0,
"RewriteEnabled": true,
"Sd": {
"BucketCols": [
""
],
"Cols": [
{
"Comment": "",
"Name": "",
"Type": ""
}
],
"Compressed": true,
"InputFormat": "",
"Location": "",
"NumBuckets": 0,
"OutputFormat": "",
"Parameters": {
"key": ""
},
"SerDeInfo": {
"Name": "",
"SerializationLib": ""
},
"SkewedInfo": {
"SkewedColNames": [
""
],
"SkewedColValueLocationMaps": {
"key": ""
},
"SkewedColValues": [
[
""
]
]
},
"SortCols": [
{
"Col": "",
"Order": 0
}
],
"StoredAsSubDirectories": true
},
"TableName": "",
"TableType": "",
"Temporary": true,
"UpdateTime": 0,
"ViewExpandedText": "",
"ViewOriginalText": "",
"TableId": "59c6c8fefeaa46d8b599c1f790c59a19",
"TableVersion": {
"Table": {
"Cascade": true,
"CreateTime": 0,
"CreatedBy": "",
"DatabaseName": "",
"LastAccessTime": 0,
"LastAnalyzedTime": 0,
"Owner": "",
"OwnerType": "",
"PartitionKeys": [
{
"Comment": "",
"Name": "",
"Type": ""
}
],
"Privileges": {},
"Retention": 0,
"RewriteEnabled": true,
"Sd": {
"BucketCols": [
""
],
"Cols": [],
"Compressed": true,
"InputFormat": "",
"Location": "",
"NumBuckets": 0,
"OutputFormat": "",
"Parameters": {
"key": ""
},
"SerDeInfo": {
"Name": "",
"SerializationLib": ""
},
"SkewedInfo": {
"SkewedColNames": [
""
],
"SkewedColValueLocationMaps": {
"key": ""
},
"SkewedColValues": [
[
""
]
]
},
"SortCols": [
{
"Col": "",
"Order": 0
}
],
"StoredAsSubDirectories": true
},
"TableName": "",
"TableType": "",
"Temporary": true,
"UpdateTime": 0,
"ViewExpandedText": "",
"ViewOriginalText": "",
"TableId": "59c6c8fefeaa46d8b599c1f790c59a19",
"TableVersion": {
"Table": {
"Cascade": true,
"CreateTime": 0,
"CreatedBy": "",
"DatabaseName": "",
"LastAccessTime": 0,
"LastAnalyzedTime": 0,
"Owner": "",
"OwnerType": "",
"PartitionKeys": [],
"Retention": 0,
"RewriteEnabled": true,
"Sd": {
"BucketCols": [
""
],
"Cols": [],
"Compressed": true,
"InputFormat": "",
"Location": "",
"NumBuckets": 0,
"OutputFormat": "",
"Parameters": {
"key": ""
},
"SerDeInfo": {
"Name": "",
"SerializationLib": ""
},
"SkewedInfo": {
"SkewedColNames": [
""
],
"SkewedColValueLocationMaps": {
"key": ""
},
"SkewedColValues": [
[
""
]
]
},
"SortCols": [
{
"Col": "",
"Order": 0
}
],
"StoredAsSubDirectories": true
},
"TableName": "",
"TableType": "",
"Temporary": true,
"UpdateTime": 0,
"ViewExpandedText": "",
"ViewOriginalText": "",
"TableId": "59c6c8fefeaa46d8b599c1f790c59a19",
"TableVersion": {
"VersionId": 0
}
},
"VersionId": 0
}
},
"VersionId": 0
}
},
"HighLightList": [
{
"Key": "name",
"Value": "tab2"
}
]
}
],
"TotalCount": 1100
},
"CatalogResult": {
"Catalogs": [
{
"Catalog": {
"CatalogId": "",
"Description": "",
"LocationUri": "",
"Owner": "",
"CreatedBy": "",
"CreateTime": 0,
"UpdateTime": 0,
"Status": "",
"CatalogType": "",
"DefaultCatalog": true,
"ThriftEnabled": true,
"JdbcEnabled": true,
"StorageAccessConfig": ""
},
"HighLightList": [
{
"Key": "name",
"Value": "tab2"
}
]
}
],
"TotalCount": 100
}
}Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.