You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SPARK-28792][SQL][DOC] Document CREATE DATABASE statement in SQL Reference
# Why are the changes needed?
Currently Spark lacks documentation on the supported SQL constructs causing
confusion among users who sometimes have to look at the code to understand the
usage. This is aimed at addressing this issue.
## How was this patch tested?
This is just a documentation change, verified manually.
CREATE {DATABASE | SCHEMA} [ IF NOT EXISTS ] database_name
28
+
[ COMMENT database_comment ]
29
+
[ LOCATION database_directory ]
30
+
[ WITH DBPROPERTIES (property_name=property_value [ , ...]) ]
32
31
{% endhighlight %}
33
32
34
33
### Parameters
35
-
-##### ***IF NOT EXISTS***:
36
-
Creates a database with the given name if it doesn't exists. If a database with the same name already exists, nothing will happen.
37
-
-##### ***LOCATION***:
38
-
Path of the file system in which database to be created. If the specified path does not exist in the underlying file system, this command creates a directory with the path.
39
-
-##### ***COMMENT***:
40
-
Description for the Database.
41
-
-##### ***WITH DBPROPERTIES***:
42
-
Properties for the database in key-value pair.
34
+
<dl>
35
+
<dt><code><em>database_name</em></code></dt>
36
+
<dd>Specifies the name of the database to be created.</dd>
37
+
38
+
<dt><code><em>IF NOT EXISTS</em></code></dt>
39
+
<dd>Creates a database with the given name if it doesn't exists. If a database with the same name already exists, nothing will happen.</dd>
40
+
41
+
<dt><code><em>database_directory</em></code></dt>
42
+
<dd>Path of the file system in which database to be created. If the specified path does not exist in the underlying file system, this command creates a directory with the path. If location is not specified, database will be created in default warehouse directory.</dd>
0 commit comments