Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 27EF1200C5E for ; Fri, 7 Apr 2017 11:25:59 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2676D160B93; Fri, 7 Apr 2017 09:25:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 703BD160B97 for ; Fri, 7 Apr 2017 11:25:58 +0200 (CEST) Received: (qmail 65300 invoked by uid 500); 7 Apr 2017 09:25:57 -0000 Mailing-List: contact commits-help@carbondata.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@carbondata.incubator.apache.org Delivered-To: mailing list commits@carbondata.incubator.apache.org Received: (qmail 65291 invoked by uid 99); 7 Apr 2017 09:25:57 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Apr 2017 09:25:57 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 2C945C0254 for ; Fri, 7 Apr 2017 09:25:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.221 X-Spam-Level: X-Spam-Status: No, score=-4.221 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id vMvdUQSRXG2w for ; Fri, 7 Apr 2017 09:25:54 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id 707FB5FBFC for ; Fri, 7 Apr 2017 09:25:54 +0000 (UTC) Received: (qmail 65254 invoked by uid 99); 7 Apr 2017 09:25:53 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Apr 2017 09:25:53 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C4986E0F98; Fri, 7 Apr 2017 09:25:53 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: chenliang613@apache.org To: commits@carbondata.incubator.apache.org Date: Fri, 07 Apr 2017 09:25:53 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/2] incubator-carbondata git commit: Formatted Document archived-at: Fri, 07 Apr 2017 09:25:59 -0000 Repository: incubator-carbondata Updated Branches: refs/heads/master 24d9fd2e3 -> cfefb7418 Formatted Document Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/7962027d Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/7962027d Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/7962027d Branch: refs/heads/master Commit: 7962027d8ea4d9fb5c20cb3723b65b7ed1e476ec Parents: 24d9fd2 Author: ksimar Authored: Thu Apr 6 13:16:34 2017 +0530 Committer: chenliang613 Committed: Fri Apr 7 14:51:55 2017 +0530 ---------------------------------------------------------------------- docs/quick-start-guide.md | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/7962027d/docs/quick-start-guide.md ---------------------------------------------------------------------- diff --git a/docs/quick-start-guide.md b/docs/quick-start-guide.md index c29a8d3..5eec075 100644 --- a/docs/quick-start-guide.md +++ b/docs/quick-start-guide.md @@ -34,9 +34,7 @@ This tutorial provides a quick introduction to using CarbonData. EOF ``` -## Interactive Analysis with Spark Shell - -## Version 2.1 +## Interactive Analysis with Spark Shell Version 2.1 Apache Spark Shell provides a simple way to learn the API, as well as a powerful tool to analyze data interactively. Please visit [Apache Spark Documentation](http://spark.apache.org/docs/latest/) for more details on Spark shell. @@ -68,13 +66,13 @@ val carbon = SparkSession.builder().config(sc.getConf).getOrCreateCarbonSession( #### Executing Queries -##### Creating a Table +###### Creating a Table ``` scala>carbon.sql("CREATE TABLE IF NOT EXISTS test_table(id string, name string, city string, age Int) STORED BY 'carbondata'") ``` -##### Loading Data to a Table +###### Loading Data to a Table ``` scala>carbon.sql("LOAD DATA INPATH 'sample.csv file path' INTO TABLE test_table") @@ -89,8 +87,7 @@ scala>carbon.sql("SELECT * FROM test_table").show() scala>carbon.sql("SELECT city, avg(age), sum(age) FROM test_table GROUP BY city").show() ``` -## Interactive Analysis with Spark Shell -## Version 1.6 +## Interactive Analysis with Spark Shell Version 1.6 #### Basics @@ -117,7 +114,7 @@ val cc = new CarbonContext(sc, "") #### Executing Queries -##### Creating a Table +###### Creating a Table ``` scala>cc.sql("CREATE TABLE IF NOT EXISTS test_table (id string, name string, city string, age Int) STORED BY 'carbondata'") @@ -128,14 +125,14 @@ To see the table created : scala>cc.sql("SHOW TABLES").show() ``` -##### Loading Data to a Table +###### Loading Data to a Table ``` scala>cc.sql("LOAD DATA INPATH 'sample.csv file path' INTO TABLE test_table") ``` **NOTE**: Please provide the real file path of `sample.csv` for the above script. -##### Query Data from a Table +###### Query Data from a Table ``` scala>cc.sql("SELECT * FROM test_table").show()