Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: luhuayi <luhuayi@huawei.com> Co-committed-by: luhuayi <luhuayi@huawei.com>
9.3 KiB
ALTER EXTERNAL SCHEMA
Function
Modifies EXTERNAL SCHEMA. This syntax is supported only in 8.3.0 and later versions.
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.
Examples
Modify the database and FOREIGN SERVER corresponding to ex1.
1 2 3 | ALTER EXTERNAL SCHEMA ex1 WITH DATABASE 'demo' SERVER my_server; |
