Repository: carbondata-site
Updated Branches:
  refs/heads/asf-site 7aad1de9c -> 9da4e237e


fix typo issue


Project: http://git-wip-us.apache.org/repos/asf/carbondata-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/carbondata-site/commit/9da4e237
Tree: http://git-wip-us.apache.org/repos/asf/carbondata-site/tree/9da4e237
Diff: http://git-wip-us.apache.org/repos/asf/carbondata-site/diff/9da4e237

Branch: refs/heads/asf-site
Commit: 9da4e237e78f42214e732a5b1bcb5fbe39ad0388
Parents: 7aad1de
Author: chenliang613 <[email protected]>
Authored: Sun Mar 25 09:45:04 2018 +0800
Committer: chenliang613 <[email protected]>
Committed: Sun Mar 25 09:45:04 2018 +0800

----------------------------------------------------------------------
 content/WEB-INF/classes/html/header.html        |  3 ++
 content/data-management-on-carbondata.html      | 45 ++++++++++++++----
 content/installation-guide.html                 |  4 +-
 content/timeseries-datamap-guide.html           | 16 +++----
 .../webapp/data-management-on-carbondata.html   | 45 ++++++++++++++----
 src/main/webapp/installation-guide.html         |  4 +-
 src/main/webapp/timeseries-datamap-guide.html   | 16 +++----
 .../markdown/data-management-on-carbondata.md   | 48 +++++++++++++++-----
 src/site/markdown/installation-guide.md         |  4 +-
 src/site/markdown/timeseries-datamap-guide.md   | 16 +++----
 10 files changed, 139 insertions(+), 62 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/9da4e237/content/WEB-INF/classes/html/header.html
----------------------------------------------------------------------
diff --git a/content/WEB-INF/classes/html/header.html 
b/content/WEB-INF/classes/html/header.html
index 5ce0b5d..d2ebd58 100644
--- a/content/WEB-INF/classes/html/header.html
+++ b/content/WEB-INF/classes/html/header.html
@@ -51,6 +51,9 @@
                            aria-expanded="false"> Download <span 
class="caret"></span></a>
                         <ul class="dropdown-menu">
                             <li>
+                                <a 
href="https://dist.apache.org/repos/dist/release/carbondata/1.3.1/";
+                                   target="_blank">Apache CarbonData 
1.3.1</a></li>
+                            <li>
                                 <a 
href="https://dist.apache.org/repos/dist/release/carbondata/1.3.0/";
                                    target="_blank">Apache CarbonData 
1.3.0</a></li>
                             <li>

http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/9da4e237/content/data-management-on-carbondata.html
----------------------------------------------------------------------
diff --git a/content/data-management-on-carbondata.html 
b/content/data-management-on-carbondata.html
index 13ff8fb..fd64b8a 100644
--- a/content/data-management-on-carbondata.html
+++ b/content/data-management-on-carbondata.html
@@ -287,6 +287,40 @@ Following are 5 configurations:</p>
                 'SORT_SCOPE'='NO_SORT')
 </code></pre>
 <h2>
+<a id="create-table-as-select" class="anchor" href="#create-table-as-select" 
aria-hidden="true"><span aria-hidden="true" class="octicon 
octicon-link"></span></a>CREATE TABLE AS SELECT</h2>
+<p>This function allows user 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.</p>
+<h3>
+<a id="syntax" class="anchor" href="#syntax" aria-hidden="true"><span 
aria-hidden="true" class="octicon octicon-link"></span></a>Syntax</h3>
+<pre><code>CREATE TABLE [IF NOT EXISTS] [db_name.]table_name 
+STORED BY 'carbondata' 
+[TBLPROPERTIES (key1=val1, key2=val2, ...)] 
+AS select_statement;
+</code></pre>
+<h3>
+<a id="examples" class="anchor" href="#examples" aria-hidden="true"><span 
aria-hidden="true" class="octicon octicon-link"></span></a>Examples</h3>
+<pre><code>carbon.sql("CREATE TABLE source_table(
+                           id INT,
+                           name STRING,
+                           city STRING,
+                           age INT)
+            STORED AS parquet")
+carbon.sql("INSERT INTO source_table SELECT 1,'bob','shenzhen',27")
+carbon.sql("INSERT INTO source_table SELECT 2,'david','shenzhen',31")
+
+carbon.sql("CREATE TABLE target_table
+            STORED BY 'carbondata'
+            AS SELECT city,avg(age) FROM source_table GROUP BY city")
+            
+carbon.sql("SELECT * FROM target_table").show
+  // results:
+  //    +--------+--------+
+  //    |    city|avg(age)|
+  //    +--------+--------+
+  //    |shenzhen|    29.0|
+  //    +--------+--------+
+
+</code></pre>
+<h2>
 <a id="create-database" class="anchor" href="#create-database" 
aria-hidden="true"><span aria-hidden="true" class="octicon 
octicon-link"></span></a>CREATE DATABASE</h2>
 <p>This function creates a new database. By default the database is created in 
Carbon store location, but you can also specify custom location.</p>
 <pre><code>CREATE DATABASE [IF NOT EXISTS] database_name [LOCATION path];
@@ -296,15 +330,6 @@ Following are 5 configurations:</p>
 <pre><code>CREATE DATABASE carbon LOCATION 
?hdfs://name_cluster/dir1/carbonstore?;
 </code></pre>
 <h2>
-<a id="create-table-as-select" class="anchor" href="#create-table-as-select" 
aria-hidden="true"><span aria-hidden="true" class="octicon 
octicon-link"></span></a>CREATE TABLE As SELECT</h2>
-<p>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.</p>
-<pre><code>CREATE TABLE [IF NOT EXISTS] [db_name.]table_name STORED BY 
'carbondata' [TBLPROPERTIES (key1=val1, key2=val2, ...)] AS select_statement;
-</code></pre>
-<h3>
-<a id="examples" class="anchor" href="#examples" aria-hidden="true"><span 
aria-hidden="true" class="octicon octicon-link"></span></a>Examples</h3>
-<pre><code>CREATE TABLE ctas_select_parquet STORED BY 'carbondata' as select * 
from parquet_ctas_test;
-</code></pre>
-<h2>
 <a id="table-management" class="anchor" href="#table-management" 
aria-hidden="true"><span aria-hidden="true" class="octicon 
octicon-link"></span></a>TABLE MANAGEMENT</h2>
 <h3>
 <a id="show-table" class="anchor" href="#show-table" aria-hidden="true"><span 
aria-hidden="true" class="octicon octicon-link"></span></a>SHOW TABLE</h3>
@@ -705,7 +730,7 @@ STORED BY 'carbondata'
 <pre><code>LOAD DATA [LOCAL] INPATH 'folder_path' 
 INTO TABLE [db_name.]table_name PARTITION (partition_spec) 
 OPTIONS(property_name=property_value, ...)    
-INSERT INTO INTO TABLE [db_name.]table_name PARTITION (partition_spec) 
&lt;SELECT STATMENT&gt;
+INSERT INTO INTO TABLE [db_name.]table_name PARTITION (partition_spec) 
&lt;SELECT STATEMENT&gt;
 </code></pre>
 <p>Example:</p>
 <pre><code>LOAD DATA LOCAL INPATH '${env:HOME}/staticinput.csv'

http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/9da4e237/content/installation-guide.html
----------------------------------------------------------------------
diff --git a/content/installation-guide.html b/content/installation-guide.html
index f6300dc..6d944f7 100644
--- a/content/installation-guide.html
+++ b/content/installation-guide.html
@@ -274,7 +274,7 @@
 --executor-memory 2G
 </code></pre>
 <p><strong>NOTE</strong>: Make sure you have permissions for CarbonData JARs 
and files through which driver and executor will start.</p>
-<p>To get started with CarbonData : <a href="quick-start-guide.html">Quick 
Start</a>, <a href="ddl-operation-on-carbondata.html">DDL Operations on 
CarbonData</a></p>
+<p>To get started with CarbonData : <a href="quick-start-guide.html">Quick 
Start</a>, <a href="data-management-on-carbondata.html">Data Management on 
CarbonData</a></p>
 <h2>
 <a id="installing-and-configuring-carbondata-on-spark-on-yarn-cluster" 
class="anchor" 
href="#installing-and-configuring-carbondata-on-spark-on-yarn-cluster" 
aria-hidden="true"><span aria-hidden="true" class="octicon 
octicon-link"></span></a>Installing and Configuring CarbonData on Spark on YARN 
Cluster</h2>
 <p>This section provides the procedure to install CarbonData on "Spark on 
YARN" cluster.</p>
@@ -383,7 +383,7 @@ mv carbondata.tar.gz carbonlib/
  --executor-cores 2 --executor-memory 2G
 </code></pre>
 <p><strong>NOTE</strong>: Make sure you have permissions for CarbonData JARs 
and files through which driver and executor will start.</p>
-<p>Getting started with CarbonData : <a href="quick-start-guide.html">Quick 
Start</a>, <a href="ddl-operation-on-carbondata.html">DDL Operations on 
CarbonData</a></p>
+<p>Getting started with CarbonData : <a href="quick-start-guide.html">Quick 
Start</a>, <a href="data-management-on-carbondata.html">Data Management on 
CarbonData</a></p>
 <h2>
 <a id="query-execution-using-carbondata-thrift-server" class="anchor" 
href="#query-execution-using-carbondata-thrift-server" aria-hidden="true"><span 
aria-hidden="true" class="octicon octicon-link"></span></a>Query Execution 
Using CarbonData Thrift Server</h2>
 <h3>

http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/9da4e237/content/timeseries-datamap-guide.html
----------------------------------------------------------------------
diff --git a/content/timeseries-datamap-guide.html 
b/content/timeseries-datamap-guide.html
index 9b136ca..300e879 100644
--- a/content/timeseries-datamap-guide.html
+++ b/content/timeseries-datamap-guide.html
@@ -199,7 +199,7 @@ ON TABLE sales
 USING "timeseries"
 DMPROPERTIES (
   'event_time'='order_time',
-  'year_granualrity'='1',
+  'year_granularity'='1',
 ) AS
 SELECT order_time, country, sex, sum(quantity), max(quantity), count(user_id), 
sum(price),
  avg(price) FROM sales GROUP BY order_time, country, sex
@@ -209,7 +209,7 @@ ON TABLE sales
 USING "timeseries"
 DMPROPERTIES (
   'event_time'='order_time',
-  'month_granualrity'='1',
+  'month_granularity'='1',
 ) AS
 SELECT order_time, country, sex, sum(quantity), max(quantity), count(user_id), 
sum(price),
  avg(price) FROM sales GROUP BY order_time, country, sex
@@ -219,7 +219,7 @@ ON TABLE sales
 USING "timeseries"
 DMPROPERTIES (
   'event_time'='order_time',
-  'day_granualrity'='1',
+  'day_granularity'='1',
 ) AS
 SELECT order_time, country, sex, sum(quantity), max(quantity), count(user_id), 
sum(price),
  avg(price) FROM sales GROUP BY order_time, country, sex
@@ -229,7 +229,7 @@ ON TABLE sales
 USING "timeseries"
 DMPROPERTIES (
   'event_time'='order_time',
-  'hour_granualrity'='1',
+  'hour_granularity'='1',
 ) AS
 SELECT order_time, country, sex, sum(quantity), max(quantity), count(user_id), 
sum(price),
  avg(price) FROM sales GROUP BY order_time, country, sex
@@ -239,7 +239,7 @@ ON TABLE sales
 USING "timeseries"
 DMPROPERTIES (
   'event_time'='order_time',
-  'minute_granualrity'='1',
+  'minute_granularity'='1',
 ) AS
 SELECT order_time, country, sex, sum(quantity), max(quantity), count(user_id), 
sum(price),
  avg(price) FROM sales GROUP BY order_time, country, sex
@@ -249,7 +249,7 @@ ON TABLE sales
 USING "timeseries"
 DMPROPERTIES (
   'event_time'='order_time',
-  'minute_granualrity'='1',
+  'minute_granularity'='1',
 ) AS
 SELECT order_time, country, sex, sum(quantity), max(quantity), count(user_id), 
sum(price),
  avg(price) FROM sales GROUP BY order_time, country, sex
@@ -270,7 +270,7 @@ level and hour level pre-aggregate</p>
   USING "timeseries"
   DMPROPERTIES (
     'event_time'='order_time',
-    'day_granualrity'='1',
+    'day_granularity'='1',
   ) AS
   SELECT order_time, country, sex, sum(quantity), max(quantity), 
count(user_id), sum(price),
    avg(price) FROM sales GROUP BY order_time, country, sex
@@ -280,7 +280,7 @@ level and hour level pre-aggregate</p>
   USING "timeseries"
   DMPROPERTIES (
     'event_time'='order_time',
-    'hour_granualrity'='1',
+    'hour_granularity'='1',
   ) AS
   SELECT order_time, country, sex, sum(quantity), max(quantity), 
count(user_id), sum(price),
    avg(price) FROM sales GROUP BY order_time, country, sex

http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/9da4e237/src/main/webapp/data-management-on-carbondata.html
----------------------------------------------------------------------
diff --git a/src/main/webapp/data-management-on-carbondata.html 
b/src/main/webapp/data-management-on-carbondata.html
index 13ff8fb..fd64b8a 100644
--- a/src/main/webapp/data-management-on-carbondata.html
+++ b/src/main/webapp/data-management-on-carbondata.html
@@ -287,6 +287,40 @@ Following are 5 configurations:</p>
                 'SORT_SCOPE'='NO_SORT')
 </code></pre>
 <h2>
+<a id="create-table-as-select" class="anchor" href="#create-table-as-select" 
aria-hidden="true"><span aria-hidden="true" class="octicon 
octicon-link"></span></a>CREATE TABLE AS SELECT</h2>
+<p>This function allows user 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.</p>
+<h3>
+<a id="syntax" class="anchor" href="#syntax" aria-hidden="true"><span 
aria-hidden="true" class="octicon octicon-link"></span></a>Syntax</h3>
+<pre><code>CREATE TABLE [IF NOT EXISTS] [db_name.]table_name 
+STORED BY 'carbondata' 
+[TBLPROPERTIES (key1=val1, key2=val2, ...)] 
+AS select_statement;
+</code></pre>
+<h3>
+<a id="examples" class="anchor" href="#examples" aria-hidden="true"><span 
aria-hidden="true" class="octicon octicon-link"></span></a>Examples</h3>
+<pre><code>carbon.sql("CREATE TABLE source_table(
+                           id INT,
+                           name STRING,
+                           city STRING,
+                           age INT)
+            STORED AS parquet")
+carbon.sql("INSERT INTO source_table SELECT 1,'bob','shenzhen',27")
+carbon.sql("INSERT INTO source_table SELECT 2,'david','shenzhen',31")
+
+carbon.sql("CREATE TABLE target_table
+            STORED BY 'carbondata'
+            AS SELECT city,avg(age) FROM source_table GROUP BY city")
+            
+carbon.sql("SELECT * FROM target_table").show
+  // results:
+  //    +--------+--------+
+  //    |    city|avg(age)|
+  //    +--------+--------+
+  //    |shenzhen|    29.0|
+  //    +--------+--------+
+
+</code></pre>
+<h2>
 <a id="create-database" class="anchor" href="#create-database" 
aria-hidden="true"><span aria-hidden="true" class="octicon 
octicon-link"></span></a>CREATE DATABASE</h2>
 <p>This function creates a new database. By default the database is created in 
Carbon store location, but you can also specify custom location.</p>
 <pre><code>CREATE DATABASE [IF NOT EXISTS] database_name [LOCATION path];
@@ -296,15 +330,6 @@ Following are 5 configurations:</p>
 <pre><code>CREATE DATABASE carbon LOCATION 
?hdfs://name_cluster/dir1/carbonstore?;
 </code></pre>
 <h2>
-<a id="create-table-as-select" class="anchor" href="#create-table-as-select" 
aria-hidden="true"><span aria-hidden="true" class="octicon 
octicon-link"></span></a>CREATE TABLE As SELECT</h2>
-<p>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.</p>
-<pre><code>CREATE TABLE [IF NOT EXISTS] [db_name.]table_name STORED BY 
'carbondata' [TBLPROPERTIES (key1=val1, key2=val2, ...)] AS select_statement;
-</code></pre>
-<h3>
-<a id="examples" class="anchor" href="#examples" aria-hidden="true"><span 
aria-hidden="true" class="octicon octicon-link"></span></a>Examples</h3>
-<pre><code>CREATE TABLE ctas_select_parquet STORED BY 'carbondata' as select * 
from parquet_ctas_test;
-</code></pre>
-<h2>
 <a id="table-management" class="anchor" href="#table-management" 
aria-hidden="true"><span aria-hidden="true" class="octicon 
octicon-link"></span></a>TABLE MANAGEMENT</h2>
 <h3>
 <a id="show-table" class="anchor" href="#show-table" aria-hidden="true"><span 
aria-hidden="true" class="octicon octicon-link"></span></a>SHOW TABLE</h3>
@@ -705,7 +730,7 @@ STORED BY 'carbondata'
 <pre><code>LOAD DATA [LOCAL] INPATH 'folder_path' 
 INTO TABLE [db_name.]table_name PARTITION (partition_spec) 
 OPTIONS(property_name=property_value, ...)    
-INSERT INTO INTO TABLE [db_name.]table_name PARTITION (partition_spec) 
&lt;SELECT STATMENT&gt;
+INSERT INTO INTO TABLE [db_name.]table_name PARTITION (partition_spec) 
&lt;SELECT STATEMENT&gt;
 </code></pre>
 <p>Example:</p>
 <pre><code>LOAD DATA LOCAL INPATH '${env:HOME}/staticinput.csv'

http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/9da4e237/src/main/webapp/installation-guide.html
----------------------------------------------------------------------
diff --git a/src/main/webapp/installation-guide.html 
b/src/main/webapp/installation-guide.html
index f6300dc..6d944f7 100644
--- a/src/main/webapp/installation-guide.html
+++ b/src/main/webapp/installation-guide.html
@@ -274,7 +274,7 @@
 --executor-memory 2G
 </code></pre>
 <p><strong>NOTE</strong>: Make sure you have permissions for CarbonData JARs 
and files through which driver and executor will start.</p>
-<p>To get started with CarbonData : <a href="quick-start-guide.html">Quick 
Start</a>, <a href="ddl-operation-on-carbondata.html">DDL Operations on 
CarbonData</a></p>
+<p>To get started with CarbonData : <a href="quick-start-guide.html">Quick 
Start</a>, <a href="data-management-on-carbondata.html">Data Management on 
CarbonData</a></p>
 <h2>
 <a id="installing-and-configuring-carbondata-on-spark-on-yarn-cluster" 
class="anchor" 
href="#installing-and-configuring-carbondata-on-spark-on-yarn-cluster" 
aria-hidden="true"><span aria-hidden="true" class="octicon 
octicon-link"></span></a>Installing and Configuring CarbonData on Spark on YARN 
Cluster</h2>
 <p>This section provides the procedure to install CarbonData on "Spark on 
YARN" cluster.</p>
@@ -383,7 +383,7 @@ mv carbondata.tar.gz carbonlib/
  --executor-cores 2 --executor-memory 2G
 </code></pre>
 <p><strong>NOTE</strong>: Make sure you have permissions for CarbonData JARs 
and files through which driver and executor will start.</p>
-<p>Getting started with CarbonData : <a href="quick-start-guide.html">Quick 
Start</a>, <a href="ddl-operation-on-carbondata.html">DDL Operations on 
CarbonData</a></p>
+<p>Getting started with CarbonData : <a href="quick-start-guide.html">Quick 
Start</a>, <a href="data-management-on-carbondata.html">Data Management on 
CarbonData</a></p>
 <h2>
 <a id="query-execution-using-carbondata-thrift-server" class="anchor" 
href="#query-execution-using-carbondata-thrift-server" aria-hidden="true"><span 
aria-hidden="true" class="octicon octicon-link"></span></a>Query Execution 
Using CarbonData Thrift Server</h2>
 <h3>

http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/9da4e237/src/main/webapp/timeseries-datamap-guide.html
----------------------------------------------------------------------
diff --git a/src/main/webapp/timeseries-datamap-guide.html 
b/src/main/webapp/timeseries-datamap-guide.html
index 9b136ca..300e879 100644
--- a/src/main/webapp/timeseries-datamap-guide.html
+++ b/src/main/webapp/timeseries-datamap-guide.html
@@ -199,7 +199,7 @@ ON TABLE sales
 USING "timeseries"
 DMPROPERTIES (
   'event_time'='order_time',
-  'year_granualrity'='1',
+  'year_granularity'='1',
 ) AS
 SELECT order_time, country, sex, sum(quantity), max(quantity), count(user_id), 
sum(price),
  avg(price) FROM sales GROUP BY order_time, country, sex
@@ -209,7 +209,7 @@ ON TABLE sales
 USING "timeseries"
 DMPROPERTIES (
   'event_time'='order_time',
-  'month_granualrity'='1',
+  'month_granularity'='1',
 ) AS
 SELECT order_time, country, sex, sum(quantity), max(quantity), count(user_id), 
sum(price),
  avg(price) FROM sales GROUP BY order_time, country, sex
@@ -219,7 +219,7 @@ ON TABLE sales
 USING "timeseries"
 DMPROPERTIES (
   'event_time'='order_time',
-  'day_granualrity'='1',
+  'day_granularity'='1',
 ) AS
 SELECT order_time, country, sex, sum(quantity), max(quantity), count(user_id), 
sum(price),
  avg(price) FROM sales GROUP BY order_time, country, sex
@@ -229,7 +229,7 @@ ON TABLE sales
 USING "timeseries"
 DMPROPERTIES (
   'event_time'='order_time',
-  'hour_granualrity'='1',
+  'hour_granularity'='1',
 ) AS
 SELECT order_time, country, sex, sum(quantity), max(quantity), count(user_id), 
sum(price),
  avg(price) FROM sales GROUP BY order_time, country, sex
@@ -239,7 +239,7 @@ ON TABLE sales
 USING "timeseries"
 DMPROPERTIES (
   'event_time'='order_time',
-  'minute_granualrity'='1',
+  'minute_granularity'='1',
 ) AS
 SELECT order_time, country, sex, sum(quantity), max(quantity), count(user_id), 
sum(price),
  avg(price) FROM sales GROUP BY order_time, country, sex
@@ -249,7 +249,7 @@ ON TABLE sales
 USING "timeseries"
 DMPROPERTIES (
   'event_time'='order_time',
-  'minute_granualrity'='1',
+  'minute_granularity'='1',
 ) AS
 SELECT order_time, country, sex, sum(quantity), max(quantity), count(user_id), 
sum(price),
  avg(price) FROM sales GROUP BY order_time, country, sex
@@ -270,7 +270,7 @@ level and hour level pre-aggregate</p>
   USING "timeseries"
   DMPROPERTIES (
     'event_time'='order_time',
-    'day_granualrity'='1',
+    'day_granularity'='1',
   ) AS
   SELECT order_time, country, sex, sum(quantity), max(quantity), 
count(user_id), sum(price),
    avg(price) FROM sales GROUP BY order_time, country, sex
@@ -280,7 +280,7 @@ level and hour level pre-aggregate</p>
   USING "timeseries"
   DMPROPERTIES (
     'event_time'='order_time',
-    'hour_granualrity'='1',
+    'hour_granularity'='1',
   ) AS
   SELECT order_time, country, sex, sum(quantity), max(quantity), 
count(user_id), sum(price),
    avg(price) FROM sales GROUP BY order_time, country, sex

http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/9da4e237/src/site/markdown/data-management-on-carbondata.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/data-management-on-carbondata.md 
b/src/site/markdown/data-management-on-carbondata.md
index cb9a17c..22db960 100644
--- a/src/site/markdown/data-management-on-carbondata.md
+++ b/src/site/markdown/data-management-on-carbondata.md
@@ -139,6 +139,41 @@ This tutorial is going to introduce all commands and data 
operations on CarbonDa
                    'SORT_SCOPE'='NO_SORT')
    ```
 
+## CREATE TABLE AS SELECT
+  This function allows user 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.
+### Syntax
+  ```
+  CREATE TABLE [IF NOT EXISTS] [db_name.]table_name 
+  STORED BY 'carbondata' 
+  [TBLPROPERTIES (key1=val1, key2=val2, ...)] 
+  AS select_statement;
+  ```
+
+### Examples
+  ```
+  carbon.sql("CREATE TABLE source_table(
+                             id INT,
+                             name STRING,
+                             city STRING,
+                             age INT)
+              STORED AS parquet")
+  carbon.sql("INSERT INTO source_table SELECT 1,'bob','shenzhen',27")
+  carbon.sql("INSERT INTO source_table SELECT 2,'david','shenzhen',31")
+  
+  carbon.sql("CREATE TABLE target_table
+              STORED BY 'carbondata'
+              AS SELECT city,avg(age) FROM source_table GROUP BY city")
+              
+  carbon.sql("SELECT * FROM target_table").show
+    // results:
+    //    +--------+--------+
+    //    |    city|avg(age)|
+    //    +--------+--------+
+    //    |shenzhen|    29.0|
+    //    +--------+--------+
+
+  ```
+
 ## 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.
   ```
@@ -150,17 +185,6 @@ This tutorial is going to introduce all commands and data 
operations on CarbonDa
   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.
-  ```
-  CREATE TABLE [IF NOT EXISTS] [db_name.]table_name STORED BY 'carbondata' 
[TBLPROPERTIES (key1=val1, key2=val2, ...)] AS select_statement;
-  ```
-
-### Examples
-  ```
-  CREATE TABLE ctas_select_parquet STORED BY 'carbondata' as select * from 
parquet_ctas_test;
-  ```
-   
 ## TABLE MANAGEMENT  
 
 ### SHOW TABLE
@@ -675,7 +699,7 @@ This tutorial is going to introduce all commands and data 
operations on CarbonDa
   LOAD DATA [LOCAL] INPATH 'folder_path' 
   INTO TABLE [db_name.]table_name PARTITION (partition_spec) 
   OPTIONS(property_name=property_value, ...)    
-  INSERT INTO INTO TABLE [db_name.]table_name PARTITION (partition_spec) 
<SELECT STATMENT>
+  INSERT INTO INTO TABLE [db_name.]table_name PARTITION (partition_spec) 
<SELECT STATEMENT>
   ```
   
   Example:

http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/9da4e237/src/site/markdown/installation-guide.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/installation-guide.md 
b/src/site/markdown/installation-guide.md
index 37f1fdb..f679338 100644
--- a/src/site/markdown/installation-guide.md
+++ b/src/site/markdown/installation-guide.md
@@ -73,7 +73,7 @@ followed by :
 
 **NOTE**: Make sure you have permissions for CarbonData JARs and files through 
which driver and executor will start.
 
-To get started with CarbonData : [Quick Start](quick-start-guide.md), [DDL 
Operations on CarbonData](ddl-operation-on-carbondata.md)
+To get started with CarbonData : [Quick Start](quick-start-guide.md), [Data 
Management on CarbonData](data-management-on-carbondata.md)
 
 ## Installing and Configuring CarbonData on Spark on YARN Cluster
 
@@ -129,7 +129,7 @@ mv carbondata.tar.gz carbonlib/
 ```
   **NOTE**: Make sure you have permissions for CarbonData JARs and files 
through which driver and executor will start.
 
-  Getting started with CarbonData : [Quick Start](quick-start-guide.md), [DDL 
Operations on CarbonData](ddl-operation-on-carbondata.md)
+  Getting started with CarbonData : [Quick Start](quick-start-guide.md), [Data 
Management on CarbonData](data-management-on-carbondata.md)
 
 ## Query Execution Using CarbonData Thrift Server
 

http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/9da4e237/src/site/markdown/timeseries-datamap-guide.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/timeseries-datamap-guide.md 
b/src/site/markdown/timeseries-datamap-guide.md
index 886c161..7847312 100644
--- a/src/site/markdown/timeseries-datamap-guide.md
+++ b/src/site/markdown/timeseries-datamap-guide.md
@@ -27,7 +27,7 @@ ON TABLE sales
 USING "timeseries"
 DMPROPERTIES (
   'event_time'='order_time',
-  'year_granualrity'='1',
+  'year_granularity'='1',
 ) AS
 SELECT order_time, country, sex, sum(quantity), max(quantity), count(user_id), 
sum(price),
  avg(price) FROM sales GROUP BY order_time, country, sex
@@ -37,7 +37,7 @@ ON TABLE sales
 USING "timeseries"
 DMPROPERTIES (
   'event_time'='order_time',
-  'month_granualrity'='1',
+  'month_granularity'='1',
 ) AS
 SELECT order_time, country, sex, sum(quantity), max(quantity), count(user_id), 
sum(price),
  avg(price) FROM sales GROUP BY order_time, country, sex
@@ -47,7 +47,7 @@ ON TABLE sales
 USING "timeseries"
 DMPROPERTIES (
   'event_time'='order_time',
-  'day_granualrity'='1',
+  'day_granularity'='1',
 ) AS
 SELECT order_time, country, sex, sum(quantity), max(quantity), count(user_id), 
sum(price),
  avg(price) FROM sales GROUP BY order_time, country, sex
@@ -57,7 +57,7 @@ ON TABLE sales
 USING "timeseries"
 DMPROPERTIES (
   'event_time'='order_time',
-  'hour_granualrity'='1',
+  'hour_granularity'='1',
 ) AS
 SELECT order_time, country, sex, sum(quantity), max(quantity), count(user_id), 
sum(price),
  avg(price) FROM sales GROUP BY order_time, country, sex
@@ -67,7 +67,7 @@ ON TABLE sales
 USING "timeseries"
 DMPROPERTIES (
   'event_time'='order_time',
-  'minute_granualrity'='1',
+  'minute_granularity'='1',
 ) AS
 SELECT order_time, country, sex, sum(quantity), max(quantity), count(user_id), 
sum(price),
  avg(price) FROM sales GROUP BY order_time, country, sex
@@ -77,7 +77,7 @@ ON TABLE sales
 USING "timeseries"
 DMPROPERTIES (
   'event_time'='order_time',
-  'minute_granualrity'='1',
+  'minute_granularity'='1',
 ) AS
 SELECT order_time, country, sex, sum(quantity), max(quantity), count(user_id), 
sum(price),
  avg(price) FROM sales GROUP BY order_time, country, sex
@@ -105,7 +105,7 @@ level and hour level pre-aggregate
   USING "timeseries"
   DMPROPERTIES (
     'event_time'='order_time',
-    'day_granualrity'='1',
+    'day_granularity'='1',
   ) AS
   SELECT order_time, country, sex, sum(quantity), max(quantity), 
count(user_id), sum(price),
    avg(price) FROM sales GROUP BY order_time, country, sex
@@ -115,7 +115,7 @@ level and hour level pre-aggregate
   USING "timeseries"
   DMPROPERTIES (
     'event_time'='order_time',
-    'hour_granualrity'='1',
+    'hour_granularity'='1',
   ) AS
   SELECT order_time, country, sex, sum(quantity), max(quantity), 
count(user_id), sum(price),
    avg(price) FROM sales GROUP BY order_time, country, sex

Reply via email to