You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by sgururajshetty <gi...@git.apache.org> on 2018/02/03 15:31:23 UTC

[GitHub] carbondata pull request #1926: [CARBONDATA-2127] Documentation for Hive Stan...

GitHub user sgururajshetty opened a pull request:

    https://github.com/apache/carbondata/pull/1926

    [CARBONDATA-2127] Documentation for Hive Standard Partition

    Documentation for Hive Standard Partition

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sgururajshetty/carbondata 2127

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/carbondata/pull/1926.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1926
    
----
commit f97d0b5eca4d06d40d14436c7b62d93691d77e58
Author: sgururajshetty <sg...@...>
Date:   2018-02-03T15:34:23Z

    Documentation for Hive Standard Partition

----


---

[GitHub] carbondata issue #1926: [CARBONDATA-2127] Documentation for Hive Standard Pa...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1926
  
    Can one of the admins verify this patch?


---

[GitHub] carbondata issue #1926: [CARBONDATA-2127] Documentation for Hive Standard Pa...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1926
  
    LGTM


---

[GitHub] carbondata pull request #1926: [CARBONDATA-2127] Documentation for Hive Stan...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1926#discussion_r165818275
  
    --- Diff: docs/data-management-on-carbondata.md ---
    @@ -764,6 +765,107 @@ This tutorial is going to introduce all commands and data operations on CarbonDa
       * The partitioned column can be excluded from SORT_COLUMNS, this will let other columns to do the efficient sorting.
       * When writing SQL on a partition table, try to use filters on the partition column.
     
    +## HIVE STANDARD PARTITION
    +
    +  Carbon supports the partition which is custom implemented by carbon but due to compatibility issue does not allow you to use the feature of Hive. By using this function, you can use the feature available in Hive.
    +
    +### Create Partition Table
    +
    +  This command allows you to create table with partition.
    +  
    +  ```
    +  CREATE TABLE [IF NOT EXISTS] [db_name.]table_name 
    +    [(col_name data_type , ...)]
    +    [COMMENT table_comment]
    +    [PARTITIONED BY (col_name data_type , ...)]
    +    [STORED BY file_format]
    +    [TBLPROPERTIES (property_name=property_value, ...)]
    +    [AS select_statement];
    +  ```
    +  
    +  Example:
    +  ```
    +   CREATE TABLE IF NOT EXISTS productSchema.productSalesTable (
    +                                productNumber Int,
    +                                productName String,
    +                                storeCity String,
    +                                storeProvince String,
    +                                saleQuantity Int,
    +                                revenue Int)
    +  PARTITIONED BY (productCategory String, productBatch String)
    +  STORED BY 'carbondata'
    +  ```
    +		
    +### Load Data Using Static Partition
    +
    +  This command allows you to load data using static partition.
    +  
    +  ```
    +  LOAD DATA [LOCAL] INPATH 'folder_path' 
    +    INTO TABLE [db_name.]table_name PARTITION (partition_spec) 
    +    OPTIONS(property_name=property_value, ...)
    +  NSERT INTO INTO TABLE [db_name.]table_name PARTITION (partition_spec) SELECT STATMENT 
    +  ```
    +  
    +  Example:
    +  ```
    +  LOAD DATA LOCAL INPATH '${env:HOME}/staticinput.txt'
    +    INTO TABLE locationTable
    +    PARTITION (country = 'US', state = 'CA')
    +    
    +  INSERT INTO TABLE locationTable
    +    PARTITION (country = 'US', state = 'AL')
    +    SELECT * FROM another_user au 
    +    WHERE au.country = 'US' AND au.state = 'AL';
    +  ```
    +
    +### Load Data Using Dynamic Partition
    +
    +  This command allows you to load data using dynamic partition. If partition spec is not specified, then the partition is considered as dynamic.
    +
    +  Example:
    +  ```
    +  LOAD DATA LOCAL INPATH '${env:HOME}/staticinput.txt'
    +    INTO TABLE locationTable
    +          
    +  INSERT INTO TABLE locationTable
    +    SELECT * FROM another_user au 
    +    WHERE au.country = 'US' AND au.state = 'AL';
    +  ```
    +
    +### Show Partitions
    +
    +  This command gets the Hive partition information of the table
    +
    +  ```
    +  SHOW PARTITIONS [db_name.]table_name
    +  ```
    +
    +### Drop Partition
    +
    +  This command drops the specified Hive paritionOnly.
    --- End diff --
    
    typo parition only


---

[GitHub] carbondata issue #1926: [CARBONDATA-2127] Documentation for Hive Standard Pa...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1926
  
    Can one of the admins verify this patch?


---

[GitHub] carbondata pull request #1926: [CARBONDATA-2127] Documentation for Hive Stan...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/carbondata/pull/1926


---

[GitHub] carbondata issue #1926: [CARBONDATA-2127] Documentation for Hive Standard Pa...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1926
  
    Can one of the admins verify this patch?


---