On this page

ALTER SCHEMA

Updated on 2022-11-18 GMT+08:00

Syntax

ALTER SCHEMA schema_name SET LOCATION hdfs_location

ALTER (DATABASE|SCHEMA) database_name SET OWNER USER username

ALTER (DATABASE|SCHEMA) database_name SET DBPROPERTIES (property_name=property_value, ...);

Description

This statement does not move the current content of SCHEMA to the new path or modify the table or partition associated with the specified schema. It only modifies the upper-level directory of the table that is newly added to the database.

Example

Create schema foo;
-- Change the schema storage path.
ALTER SCHEMA foo SET LOCATION 'hdfs://hacluster/newlocation';
-- Change the owner of the schema.
ALTER SCHEMA foo SET OWNER user admin;
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback