2.3 KiB
2.3 KiB
title, language
| title | language |
|---|---|
| SHOW RESOURCES | en |
SHOW RESOURCES
description
This statement is used to display the resources that the user has permission to use. Ordinary users can only display the resources with permission, while root or admin users can display all the resources.
Grammar
SHOW RESOURCES
[
WHERE
[NAME [ = "your_resource_name" | LIKE "name_matcher"]]
[RESOURCETYPE = ["SPARK"]]
]
[ORDER BY ...]
[LIMIT limit][OFFSET offset];
Explain:
1) If use NAME LIKE, the name of resource is matched to show.
2) If use NAME =, the specified name is exactly matched.
3) RESOURCETYPE is specified, the corresponding rerouce type is matched.
4) Use ORDER BY to sort any combination of columns.
5) If LIMIT is specified, limit matching records are displayed. Otherwise, it is all displayed.
6) If OFFSET is specified, the query results are displayed starting with the offset offset. The offset is 0 by default.
example
1. Display all resources that the current user has permissions on
SHOW RESOURCES;
2. Show the specified resource, the name contains the string "20140102", and displays 10 properties
SHOW RESOURCES WHERE NAME LIKE "2014_01_02" LIMIT 10;
3. Display the specified resource, specify the name as "20140102" and sort in descending order by key
SHOW RESOURCES WHERE NAME = "20140102" ORDER BY `KEY` DESC;
keyword
SHOW RESOURCES