paul-rogers commented on a change in pull request #2030: Update docs for 
Metastore to point that all format plugins are supported
URL: https://github.com/apache/drill/pull/2030#discussion_r394576664
 
 

 ##########
 File path: _docs/sql-reference/sql-commands/021-create-schema.md
 ##########
 @@ -604,8 +608,32 @@ STATEMENT format displays the schema in a form compatible 
with the CREATE OR REP
         |
        
+--------------------------------------------------------------------------+
 
+### Altering Schema for a Table
+Table schema may be updated using the `ALTER SCHEMA` commands.
+
+The syntax for the command to add (or replace) columns / properties is the 
following:
+
+    ALTER SCHEMA
+    (FOR TABLE dfs.tmp.nation | PATH '/tmp/schema.json')
+    ADD [OR REPLACE]
+    [COLUMNS (col1 int, col2 varchar)]
+    [PROPERTIES ('prop1'='val1', 'prop2'='val2')]
+
+Add command will fail if column or property with the same name exists, unless 
`OR REPLACE` keywords are indicated.
 
 Review comment:
   `ALTER SCHEMA` modifies an existing schema file; it will fail if the schema 
file does not exist. (Use `CREATE SCHEMA` to create a new schema file.)
   
   To prevent accidental changes, the `ALTER SCHEMA ... ADD` command will fail 
if the requested column or property already exists. Use the `OR REPLACE` clause 
to modify an existing column or property.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to