[CARBONDATA-2126] Documentation for create database and custom location Documentation for create database and custom location
This closes #1923 Project: http://git-wip-us.apache.org/repos/asf/carbondata/repo Commit: http://git-wip-us.apache.org/repos/asf/carbondata/commit/4677fc6b Tree: http://git-wip-us.apache.org/repos/asf/carbondata/tree/4677fc6b Diff: http://git-wip-us.apache.org/repos/asf/carbondata/diff/4677fc6b Branch: refs/heads/branch-1.3 Commit: 4677fc6b437deadc47a234ae535a5017c6a2c4d8 Parents: 36ff932 Author: sgururajshetty <[email protected]> Authored: Sat Feb 3 18:38:10 2018 +0530 Committer: chenliang613 <[email protected]> Committed: Sat Feb 3 21:54:59 2018 +0800 ---------------------------------------------------------------------- docs/data-management-on-carbondata.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/carbondata/blob/4677fc6b/docs/data-management-on-carbondata.md ---------------------------------------------------------------------- diff --git a/docs/data-management-on-carbondata.md b/docs/data-management-on-carbondata.md index 66cc048..fef2371 100644 --- a/docs/data-management-on-carbondata.md +++ b/docs/data-management-on-carbondata.md @@ -20,6 +20,7 @@ This tutorial is going to introduce all commands and data operations on CarbonData. * [CREATE TABLE](#create-table) +* [CREATE DATABASE] (#create-database) * [TABLE MANAGEMENT](#table-management) * [LOAD DATA](#load-data) * [UPDATE AND DELETE](#update-and-delete) @@ -149,6 +150,17 @@ This tutorial is going to introduce all commands and data operations on CarbonDa 'ALLOWED_COMPACTION_DAYS'='5') ``` +## CREATE DATABASE + This function creates a new database. By default the database is created in Carbon store location, but you can also specify custom location. + ``` + CREATE DATABASE [IF NOT EXISTS] database_name [LOCATION path]; + ``` + +### Example + ``` + CREATE DATABASE carbon LOCATION âhdfs://name_cluster/dir1/carbonstoreâ; + ``` + ## CREATE TABLE As SELECT This function allows you to create a Carbon table from any of the Parquet/Hive/Carbon table. This is beneficial when the user wants to create Carbon table from any other Parquet/Hive table and use the Carbon query engine to query and achieve better query results for cases where Carbon is faster than other file formats. Also this feature can be used for backing up the data. ```
