spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [spark] dilipbiswal commented on a change in pull request #25528: [SPARK-28802][DOC][SQL]Document DESCRIBE DATABASE statement in SQL Reference
Date Thu, 05 Sep 2019 18:09:03 GMT
dilipbiswal commented on a change in pull request #25528: [SPARK-28802][DOC][SQL]Document DESCRIBE
DATABASE statement in SQL Reference
URL: https://github.com/apache/spark/pull/25528#discussion_r321407688
 
 

 ##########
 File path: docs/sql-ref-syntax-aux-describe-database.md
 ##########
 @@ -18,5 +18,79 @@ license: |
   See the License for the specific language governing permissions and
   limitations under the License.
 ---
+### Description
+‚Äč
+`DESCRIBE DATABASE` statement returns the metadata of an existing database. The metadata
information includes database
+name, database comment, and database location on the filesystem. If the optional `EXTENDED`
option is specified, it
+returns the basic metadata information along with the database properties. The `DATABASE`
and `SCHEMA` are
+interchangeable.
 
-**This page is under construction**
+### Syntax
+{% highlight sql %}
+{DESC | DESCRIBE} DATABASE [EXTENDED] db_name
+{% endhighlight %}
+
+### Parameters
+<dl>
+  <dt><code><em>db_name</em></code></dt>
+  <dd>
+    Specifies a name of an existing database or an existing schema in the syetem. If the
name does not exist, an
+    exception is thrown. The name is case insensitive, it is stored as low case in SPARK<br><br>
+  </dd>
+</dl>
+
+### Example
+{% highlight sql %}
+-- Create employees DATABASE
+CREATE DATABASE EMPLOYEES COMMENT 'For software companies';
+
+-- Describe employees DATABASE.
+-- Returns Database Name, Description and Root location of the filesystem for the employees
DATABASE
+DESCRIBE DATABASE Employees;
++-------------------------+-----------------------------+
+|database_description_item|database_description_value   |
++-------------------------+-----------------------------+
+|Database Name            |employees                    |
+|Description              |For software companies       |
+|Location                 |file:/Users/Temp/employees.db|
++-------------------------+-----------------------------+
+{% endhighlight %}
+
+{% highlight sql %}
+-- Create employees DATABASE
+CREATE DATABASE EMPLOYEES COMMENT 'For software companies';
 
 Review comment:
   @kevinyu98 lowercase employees.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message