Nota:
El acceso a esta página requiere autorización. Puede intentar iniciar sesión o cambiar directorios.
El acceso a esta página requiere autorización. Puede intentar cambiar los directorios.
Se aplica a:
Databricks SQL
Databricks Runtime
Devuelve los metadatos de un esquema existente.
La información de metadatos incluye el nombre, el comentario y la ubicación del esquema en el sistema de archivos.
Si se especifica la opción EXTENDED opcional, también se devuelven las propiedades de esquema.
Aunque se pueden usar tanto SCHEMA como DATABASE, se prefiere SCHEMA.
Sintaxis
{ DESC | DESCRIBE } SCHEMA [ EXTENDED ] schema_name
Parámetros
- schema_name: El nombre de un esquema (schema) existente en el sistema. Si el nombre no existe, se produce una excepción.
Ejemplos
-- Create employees SCHEMA
> CREATE SCHEMA employees COMMENT 'For software companies';
-- Describe employees SCHEMA.
-- Returns Database Name, Description and Root location of the filesystem
-- for the employees SCHEMA.
> DESCRIBE SCHEMA employees;
database_description_item database_description_value
------------------------- -----------------------------
Database Name employees
Description For software companies
Location file:/you/Temp/employees.db
-- Create employees SCHEMA
> CREATE SCHEMA employees COMMENT 'For software companies';
-- Alter employees schema to set DBPROPERTIES
> ALTER SCHEMA employees SET DBPROPERTIES ('Create-by' = 'Kevin', 'Create-date' = '09/01/2019');
-- Describe employees SCHEMA with EXTENDED option to return additional schema properties
> DESCRIBE SCHEMA EXTENDED employees;
database_description_item database_description_value
------------------------- ---------------------------------------------
Database Name employees
Description For software companies
Location file:/you/Temp/employees.db
Properties ((Create-by,kevin), (Create-date,09/01/2019))
-- Create deployment SCHEMA
> CREATE SCHEMA deployment COMMENT 'Deployment environment';
-- Describe deployment.
> DESCRIBE SCHEMA deployment;
database_description_item database_description_value
------------------------- ------------------------------
Database Name deployment
Description Deployment environment
Location file:/you/Temp/deployment.db