Resource Management
Similar to a property collection, Resource is mainly used to define some common properties for unified management or reference in other places.
Currently, Palo supports the following resources:
-
ODBC Resource
Used to define a set of information that connects to an external data source through ODBC and can be used in Create ODBC external table.
Basic concepts
A resource contains name, type and other basic information and the name is globally unique, different types of resources contain different properties, please refer to the introductions of each resource for details.
The creation and deletion of resources can only be performed by users with admin
privilege.
Users with admin
privilege can give the use privilege usage_priv
to ordinary users. Refer to Privilege Management for details.
Specific operations
There are mainly three commands in resource management
- CREATE RESOURCE:create a resource.
- DROP RESOURCE:delete a resource.
- [ALTER RESOURCE]:please wait and see.
- SHOW RESOURCES:present created resources.
Best practice
-
Manage ODBC connection information.
The user may create multiple ODBC external tables to map multiple tables of external data sources. If the connection information of the external data source changes, such as the user names, passwords, and connection address, the mapping table needs to be re created in Palo, which is rather inconvenient.
While a group of connection information can be saved in a resource in the form of resources for the references of external tables when they are created. When the connection information changes, you just need to directly modify the properties in this resource.
Resource modification function is coming soon. If you need to modify currently, you need to delete the resource and re-create the resource with the same name.