ALTER EXTERNAL SCHEMA
Function
Modifies EXTERNAL SCHEMA. Only 8.2.1.300 and later versions support this syntax.
Syntax
- Modifies an external schema based on the specified name.
1 2 3 4 5 6 7 8
ALTER EXTERNAL SCHEMA schema_name WITH [ SOURCE source_name ] [ DATABASE 'database_name' ] [ SERVER server_name ] [ CATALOG 'catalog_name' ] [ OPTIONS ( { option_name ' value ' } [, ...] ) ] [ METAADDRESS 'address'] [ CONFIGURATION 'confpath'];
Parameter Description
- schema_name
Name of the external schema to be modified.
- SOURCE
Type of the external metadata storage engine. Currently, source_type can only be dli, lakeformation, or hive.
- DATABASE
Database corresponding to the external schema.
- SERVER
Value range: an existing foreign server whose type is lf, dli, obs, or hdfs.
You can associate an external schema with a foreign server to access external data.
- CATALOG
Catalog to be accessed in LakeFormation.
- OPTIONS
Foreign table parameters. This function is supported only by 8.3.0 and later versions.
dli_project_id
Specifies the project ID corresponding to DLI. You can obtain the project ID from the management console. This parameter is available only when the server type is DLI.
- METAADDRESS
Hivemetastore communication interface. This parameter is supported only by 9.1.0 and later versions.
- CONFIGURATION
Path for storing hivemetastore configuration files. This parameter is supported only by 9.1.0 and later versions.
If objects in the schema on the current search path are with the same name, specify the schemas different objects are in. You can run the SHOW SEARCH_PATH command to check the schemas on the current search path.
Examples
Modify the database and FOREIGN SERVER corresponding to ex1.
1 2 3 |
ALTER EXTERNAL SCHEMA ex1 WITH DATABASE 'demo' SERVER lf_server; |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot