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 E207E200BDA for ; Tue, 13 Dec 2016 16:33:48 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E0B4C160B07; Tue, 13 Dec 2016 15:33:48 +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 6F279160B31 for ; Tue, 13 Dec 2016 16:33:47 +0100 (CET) Received: (qmail 43009 invoked by uid 500); 13 Dec 2016 15:33:46 -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 43000 invoked by uid 99); 13 Dec 2016 15:33:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Dec 2016 15:33:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 1DE1A1AAB79 for ; Tue, 13 Dec 2016 15:33:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -5.218 X-Spam-Level: X-Spam-Status: No, score=-5.218 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_HTMLNOISE=1, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id z5LzJvwLqfVc for ; Tue, 13 Dec 2016 15:33:41 +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 4CB3A61A04 for ; Tue, 13 Dec 2016 15:33:40 +0000 (UTC) Received: (qmail 42550 invoked by uid 99); 13 Dec 2016 15:33:39 -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; Tue, 13 Dec 2016 15:33:39 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 97D4EE00DB; Tue, 13 Dec 2016 15:33:39 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: jbonofre@apache.org To: commits@carbondata.incubator.apache.org Date: Tue, 13 Dec 2016 15:33:53 -0000 Message-Id: <5c3519c064f140799e2d3aca9651bf4c@git.apache.org> In-Reply-To: <56fa37266cb74a549bec5ae7d25b8644@git.apache.org> References: <56fa37266cb74a549bec5ae7d25b8644@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [15/42] incubator-carbondata-site git commit: Update website archived-at: Tue, 13 Dec 2016 15:33:49 -0000 http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/blob/6b9f3f2c/src/main/webapp/documents/datamanagemenr.html ---------------------------------------------------------------------- diff --git a/src/main/webapp/documents/datamanagemenr.html b/src/main/webapp/documents/datamanagemenr.html new file mode 100644 index 0000000..08d1ecd --- /dev/null +++ b/src/main/webapp/documents/datamanagemenr.html @@ -0,0 +1,217 @@ + +Untitled Document.md +

<!–
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+“License”); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at

+
  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+
+

–>

+

Data Management

+

This tutorial is going to introduce you to the conceptual details of data management like :

+ +

Loading Data

+
    +
  • +

    Scenario

    +

    Once the table is created, data can be loaded into table using LOAD DATA command and will be available for query.
    +When data load is triggered, the data is encoded in Carbon format and copied into HDFS Carbon store path(specified in carbon.properties file)
    +in compressed, multi dimensional columnar format for quick analysis queries. The same command can be used to load new data or to
    +update the existing data. Only one data load can be triggered for one table. The high cardinality columns of the dictionary encoding are
    +automatically recognized and these columns will not be used for dictionary encoding.

    +
  • +
  • +

    Procedure

    +

    Data loading is a process that involves execution of multiple steps to read, sort, and encode the date in Carbon store format.
    +Each step is executed on different threads. After data loading process is complete, the status (success/partial success) is updated to
    +Carbon store metadata. The table below lists the possible load status

    +
  • +
+ + + + + + + + + + + + + + + + + +
StatusDescription
SuccessAll the data is loaded into table and no bad records found.
Partial SuccessData is loaded into table and bad records are found. Bad records are stored at carbon.badrecords.location.
+

In case of failure, the error will be logged in error log. Details of loads can be seen with SHOW SEGMENTS command. The show segment command output consists of :

+
    +
  • SegmentSequenceID
  • +
  • START_TIME OF LOAD
  • +
  • END_TIME OF LOAD
  • +
  • LOAD STATUS
  • +
+

The latest load will be displayed first in the output.

+

For load commands refer to DML operations on Carbon Data

+

##Deleting Data

+
    +
  • +

    Scenario

    +

    If you have loaded wrong data into the table, or too many bad records and want to modify and reload the data, you can delete required data loads.
    +The load can be deleted using the Segment Sequence Id or if the table contains date field then the data can be deleted using the date field.

    +
  • +
  • +

    Procedure

    +

    The loaded data can be deleted in the following two ways :

    +
      +
    1. +

      Delete by Segment ID

      +

      After you get the segment ID of the segment that you want to delete, execute the DELETE Command for the selected segment.
      +The Status of deleted segment is updated to Marked for delete / Marked for Update

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      SegmentSequenceIdStatusLoad Start TimeLoad End Time
      0Success2015-11-19 19:14:…2015-11-19 19:14:…
      1Marked for Update2015-11-19 19:54:…2015-11-19 20:08:…
      2Marked for Delete2015-11-19 20:25:…2015-11-19 20:49:…
      +
    2. +
    3. +

      Delete by Date Field

      +

      If the table contains date field, you can delete the data based on a specific date.

      +

      For delete commands refer to DML operations on Carbon Data

      +
    4. +
    +

    Note :

    +
      +
    • +

      When the delete segment DML is called, segment will not be deleted physically from the file system. Instead the segment status will be marked as “Marked for Delete”. For the query execution, this deleted segment will be excluded.

      +
    • +
    • +

      The deleted segment will be deleted physically during the next load operation and only after the maximum query execution time configured using “max.query.execution.time”. By default it is 60 minutes.

      +
    • +
    • +

      If the user wants to force delete the segment physically then he can use CLEAN FILES Command. This DML will physically delete the segment which are “Marked for delete” immediately.

      +
    • +
    +
  • +
+

##Compacting Data

+
    +
  • +

    Scenario

    +

    Frequent data ingestion results in several fragmented carbon files in the store directory. Since data is sorted only within each load, the indices perform only within each
    +load. This mean that there will be one index for each load and as number of data load increases, the number of indices also increases. As each index works only on one load,
    +the performance of indices is reduced. Carbon provides provision for compacting the loads. Compaction process combines several segments into one large segment by merge sorting the data from across the segments.

    +
  • +
  • +

    Procedure

    +

    There are two types of compaction Minor and Major compaction.

    +
      +
    • +

      Minor Compaction

      +

      In minor compaction the user can specify how many loads to be merged. Minor compaction triggers for every data load if the parameter carbon.enable.auto.load.merge is set. If any segments are available to be merged, then compaction will
      +run parallel with data load. There are 2 levels in minor compaction.

      +
        +
      • Level 1: Merging of the segments which are not yet compacted.
      • +
      • Level 2: Merging of the compacted segments again to form a bigger segment.
      • +
      +
    • +
    • +

      Major Compaction

      +

      In Major compaction, many segments can be merged into one big segment. User will specify the compaction size until which segments can be merged. Major compaction is usually done during the off-peak time.

      +
    • +
    +

    There are number of parameters related to Compaction that can be set in carbon.properties file

    +
  • +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterDefaultApplicationDescriptionValid Values
carbon.compaction.level.threshold4,3MinorThisproperty is for minor compaction which decides how many segments to be merged.Example: if it is set as 2,3 then minor compaction will be triggered for every 2 segments. 3 is the number of level 1 compacted segment which is further compacted to new segment.NA
carbon.major.compaction.size1024 MBMajorMajor compaction size can be configured using this parameter. Sum of the segments which is below this threshold will be merged.NA
carbon.numberof.preserve.segments0Minor/MajorIf the user wants to preserve some number of segments from being compacted then he can set this property.Example: carbon.numberof.preserve.segments=2 then 2 latest segments will always be excluded from the compaction.No segments will be preserved by default.0-100.
carbon.allowed.compaction.days0Minor/MajorCompaction will merge the segments which are loaded with in the specific number of days configured.Example: if the configuration is 2, then the segments which are loaded in the time frame of 2 days only will get merged. Segments which are loaded 2 days apart will not be merged.This is disabled by default.0-100.
carbon.number.of.cores.while.compacting2Minor/MajorNumber of cores which is used to write data during compaction.0-100.
+

For compaction commands refer to DDL operations on Carbon Data

+ + http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/blob/6b9f3f2c/src/main/webapp/documents/ddl.html ---------------------------------------------------------------------- diff --git a/src/main/webapp/documents/ddl.html b/src/main/webapp/documents/ddl.html new file mode 100644 index 0000000..90af0eb --- /dev/null +++ b/src/main/webapp/documents/ddl.html @@ -0,0 +1,227 @@ + +Untitled Document.md +

<!–
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+“License”); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at

+
  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+
+

–>

+

DDL Operations on CarbonData

+

This tutorial will guide you through the data definition language support provided by CarbonData.

+

Overview

+

The following DDL operations are supported in CarbonData :

+ +

CREATE TABLE

+

This command can be used to create carbon table by specifying the list of fields along with the table properties.

+
CREATE TABLE [IF NOT EXISTS] [db_name.]table_name 
+                 [(col_name data_type , ...)]               
+           STORED BY 'carbondata'
+                 [TBLPROPERTIES (property_name=property_value, ...)]
+                 // All Carbon's additional table options will go into properties
+
+

Parameter Description

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterDescriptionOptional
db_nameName of the Database. Database name should consist of Alphanumeric characters and underscore(_) special character.Yes
field_listComma separated List of fields with data type. The field names should consist of Alphanumeric characters and underscore(_) special character.No
table_nameThe name of the table in Database. Table Name should consist of Alphanumeric characters and underscore(_) special character.No
STORED BY“org.apache.carbondata.format”, identifies and creates carbon table.No
TBLPROPERTIESList of carbon table properties.
+

Usage Guideline

+

Following are the table properties usage.

+
    +
  • +

    Dictionary Encoding Configuration

    +

    By Default dictionary encoding will be enabled for all String columns, and disabled for non-String columns. User can include and exclude columns for dictionary encoding.

    +
    TBLPROPERTIES ("DICTIONARY_EXCLUDE"="column1, column2") 
    +TBLPROPERTIES ("DICTIONARY_INCLUDE"="column1, column2") 
    +
    +

    Here, DICTIONARY_EXCLUDE will exclude dictionary creation. This is applicable for high-cardinality columns and is an optional parameter. DICTIONARY_INCLUDE will generate dictionary for the columns specified in the list.

    +
  • +
  • +

    Row/Column Format Configuration

    +

    Column groups with more than one column are stored in row format, instead of columnar format. By default, each column is a separate column group.

    +
    TBLPROPERTIES ("COLUMN_GROUPS"="(column1,column3),(Column4,Column5,Column6)") 
    +
    +
  • +
  • +

    Table Block Size Configuration

    +

    The block size of table files can be defined using the property TABLE_BLOCKSIZE. It accepts only integer values. The default value is set to 1024MB and supports a range of 1MB to 2048MB.
    +If the user does’nt specify this value in the DDL command , default value is used.

    +
    TBLPROPERTIES ("TABLE_BLOCKSIZE"="512 MB")
    +
    +

    Here 512 MB means the block size of this table is 512 MB, user also can set it as 512M or 512.

    +
  • +
  • +

    Inverted Index Configuration

    +

    Inverted index is very useful to improve compression ratio and query speed, especially for those low-cardinality columns who are in reward position.
    +By default inverted index is enabled. The user can disable the inverted index creation for some columns.

    +
    TBLPROPERTIES ("NO_INVERTED_INDEX"="column1,column3")
    +
    +

    No inverted index shall be generated for the columns specified in NO_INVERTED_INDEX. This property is applicable on columns with high-cardinality and is an optional parameter.

    +

    Note :

    +
      +
    • +

      By default all columns other than numeric datatype are treated as dimensions and all columns of numeric datatype are treated as measures.

      +
    • +
    • +

      All dimensions except complex datatype columns are part of multi dimensional key(MDK). This behavior can be overridden by using TBLPROPERTIES, If the user wants to keep any column (except columns of complex datatype) in multi dimensional key then he can keep the columns either in DICTIONARY_EXCLUDE or DICTIONARY_INCLUDE.

      +
    • +
    +
  • +
+

Example:

+
CREATE TABLE IF NOT EXISTS productSchema.productSalesTable (
+                             productNumber Int,
+                             productName String, 
+                             storeCity String, 
+                             storeProvince String, 
+                             productCategory String, 
+                             productBatch String,
+                             saleQuantity Int,
+                             revenue Int)       
+                  STORED BY 'carbondata' 
+                  TBLPROPERTIES ('COLUMN_GROUPS'='(productName,productCategory)',
+                                'DICTIONARY_EXCLUDE'='productName',
+                                'DICTIONARY_INCLUDE'='productNumber',
+                                'NO_INVERTED_INDEX'='productBatch')
+
+

SHOW TABLE

+

This command can be used to list all the tables in current database or all the tables of a specific database.

+
SHOW TABLES [IN db_Name];
+
+

Parameter Description

+ + + + + + + + + + + + + + + +
ParameterDescriptionOptional
IN db_NameName of the database. Required only if tables of this specific database are to be listed.Yes
+

Example:

+
SHOW TABLES IN ProductSchema;
+
+

DROP TABLE

+

This command can be used to delete the existing table.

+
DROP TABLE [IF EXISTS] [db_name.]table_name;
+
+

Parameter Description

+ + + + + + + + + + + + + + + + + + + + +
ParameterDescriptionOptional
db_NameName of the database. If not specified, current database will be selected.YES
table_nameName of the table to be deleted.NO
+

Example:

+
DROP TABLE IF EXISTS productSchema.productSalesTable;
+
+

COMPACTION

+

This command will merge the specified number of segments into one segment. This will enhance the query performance of the table.

+
ALTER TABLE [db_name.]table_name COMPACT 'MINOR/MAJOR';
+
+

To get details about Compaction refer to Data Management

+

Parameter Description

+ + + + + + + + + + + + + + + + + + + + +
ParameterDescriptionOptional
db_nameDatabase name, if it is not specified then it uses current database.YES
table_nameThe name of the table in provided database.NO
+

Syntax

+
    +
  • Minor Compaction
  • +
+
ALTER TABLE carbontable COMPACT MINOR;
+
+
    +
  • Major Compaction
  • +
+
ALTER TABLE carbontable COMPACT MAJOR;
+
+ + http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/blob/6b9f3f2c/src/main/webapp/documents/dml.html ---------------------------------------------------------------------- diff --git a/src/main/webapp/documents/dml.html b/src/main/webapp/documents/dml.html new file mode 100644 index 0000000..b89b982 --- /dev/null +++ b/src/main/webapp/documents/dml.html @@ -0,0 +1,258 @@ + +Untitled Document.md +

<!–
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+“License”); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at

+
  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+
+

–>

+

DML Operations on CarbonData

+

This tutorial will guide you through the data manipulation language support provided by CarbonData.

+

Overview

+

The following DML operations are supported in CarbonData :

+ +

LOAD DATA

+

This command loads the user data in raw format to the Carbon specific data format store, this allows Carbon to provides good performance while querying the data.
+Please visit Data Management for more details on LOAD.

+

Syntax

+
LOAD DATA [LOCAL] INPATH 'folder_path' INTO TABLE [db_name.]table_name OPTIONS(property_name=property_value, ...)
+
+

OPTIONS are not mandatory for data loading process. Inside OPTIONS user can provide either of any options like DELIMITER,QUOTECHAR, ESCAPECHAR,MULTILINE as per requirement.

+

Note: The path shall be canonical path.

+

Parameter Description

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterDescriptionOptional
folder_pathPath of raw csv data folder or file.NO
db_nameDatabase name, if it is not specified then it uses current database.YES
table_nameThe name of the table in provided database.NO
OPTIONSExtra options provided to LoadYES
+

Usage Guideline

+

Following are the options that can be used for loading data:

+
    +
  • +

    DELIMITER: Delimiters can be provided in the load command.

    +
    OPTIONS('DELIMITER'=',')
    +
    +
  • +
  • +

    QUOTECHAR: Quote Characters can be provided in the load command.

    +
    OPTIONS('QUOTECHAR'='"')
    +
    +
  • +
  • +

    COMMENTCHAR: Comment Characters can be provided in the load command if user want to comment lines.

    +
    OPTIONS('COMMENTCHAR'='#')
    +
    +
  • +
  • +

    FILEHEADER: Headers can be provided in the LOAD DATA command if headers are missing in the source files.

    +
    OPTIONS('FILEHEADER'='column1,column2') 
    +
    +
  • +
  • +

    MULTILINE: CSV with new line character in quotes.

    +
    OPTIONS('MULTILINE'='true') 
    +
    +
  • +
  • +

    ESCAPECHAR: Escape char can be provided if user want strict validation of escape character on CSV.

    +
    OPTIONS('ESCAPECHAR'='\') 
    +
    +
  • +
  • +

    COMPLEX_DELIMITER_LEVEL_1: Split the complex type data column in a row (eg., a$b$c --> Array = {a,b,c}).

    +
    OPTIONS('COMPLEX_DELIMITER_LEVEL_1'='$') 
    +
    +
  • +
  • +

    COMPLEX_DELIMITER_LEVEL_2: Split the complex type nested data column in a row. Applies level_1 delimiter & applies level_2 based on complex data type (eg., a:b$c:d --> Array> = {{a,b},{c,d}}).

    +
    OPTIONS('COMPLEX_DELIMITER_LEVEL_2'=':') 
    +
    +
  • +
  • +

    ALL_DICTIONARY_PATH: All dictionary files path.

    +
    OPTIONS('ALL_DICTIONARY_PATH'='/opt/alldictionary/data.dictionary')
    +
    +
  • +
  • +

    COLUMNDICT: Dictionary file path for specified column.

    +
    OPTIONS('COLUMNDICT'='column1:dictionaryFilePath1, column2:dictionaryFilePath2')
    +
    +

    Note: ALL_DICTIONARY_PATH and COLUMNDICT can’t be used together.

    +
  • +
  • +

    DATEFORMAT: Date format for specified column.

    +
    OPTIONS('DATEFORMAT'='column1:dateFormat1, column2:dateFormat2')
    +
    +

    Note: Date formats are specified by date pattern strings. The date pattern letters in Carbon are
    +the same as in JAVA. Refer to SimpleDateFormat.

    +
  • +
+

Example:

+
LOAD DATA local inpath '/opt/rawdata/data.csv' INTO table carbontable
+                         options('DELIMITER'=',', 'QUOTECHAR'='"', 'COMMENTCHAR'='#',
+                                 'FILEHEADER'='empno,empname,
+ designation,doj,workgroupcategory,
+ workgroupcategoryname,deptno,deptname,projectcode,
+ projectjoindate,projectenddate,attendance,utilization,salary',
+                                 'MULTILINE'='true', 'ESCAPECHAR'='\', 
+ 'COMPLEX_DELIMITER_LEVEL_1'='$', 
+                                 'COMPLEX_DELIMITER_LEVEL_2'=':',
+                                 'ALL_DICTIONARY_PATH'='/opt/alldictionary/data.dictionary'
+                                 )
+
+
+

SHOW SEGMENTS

+

This command is used to get the segments of carbon table.

+
SHOW SEGMENTS FOR TABLE [db_name.]table_name LIMIT number_of_segments;
+
+

Parameter Description

+ + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterDescriptionOptional
db_nameDatabase name, if it is not specified then it uses current database.YES
table_nameThe name of the table in provided database.NO
number_of_segmentslimit the output to this number.YES
+

Example:

+
SHOW SEGMENTS FOR TABLE CarbonDatabase.CarbonTable LIMIT 4;
+
+

DELETE SEGMENT BY ID

+

This command is used to delete segment by using the segment ID. Each segment has a unique segment ID associated with it.
+Using this segment ID, you can remove the segment.

+

The following command will get the segmentID.

+
SHOW SEGMENTS FOR Table dbname.tablename LIMIT number_of_segments
+
+

After you retrieve the segment ID of the segment that you want to delete, execute the following command to delete the selected segment.

+
DELETE SEGMENT segment_sequence_id1, segments_sequence_id2, .... FROM TABLE tableName
+
+

Parameter Description

+ + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterDescriptionOptional
segment_idSegment Id of the load.NO
db_nameDatabase name, if it is not specified then it uses current database.YES
table_nameThe name of the table in provided database.NO
+

Example:

+
DELETE SEGMENT 0 FROM TABLE CarbonDatabase.CarbonTable;
+DELETE SEGMENT 0.1,5,8 FROM TABLE CarbonDatabase.CarbonTable;
+
+

Note: Here 0.1 is compacted segment sequence id.

+

DELETE SEGMENT BY DATE

+

This command will allow to delete the Carbon segment(s) from the store based on the date provided by the user in the DML command.
+The segment created before the particular date will be removed from the specific stores.

+
DELETE FROM TABLE [schema_name.]table_name WHERE[DATE_FIELD]BEFORE [DATE_VALUE]
+
+

Parameter Description

+ + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterDescriptionOptional
DATE_VALUEValid segement load start time value. All the segments before this specified date will be deleted.NO
db_nameDatabase name, if it is not specified then it uses current database.YES
table_nameThe name of the table in provided database.NO
+

Example:

+
DELETE SEGMENTS FROM TABLE CarbonDatabase.CarbonTable WHERE STARTTIME BEFORE '2017-06-01 12:05:06';  
+
+ + http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/blob/6b9f3f2c/src/main/webapp/documents/images/format/CarbonData_logo.png ---------------------------------------------------------------------- diff --git a/src/main/webapp/documents/images/format/CarbonData_logo.png b/src/main/webapp/documents/images/format/CarbonData_logo.png new file mode 100755 index 0000000..bc09b23 Binary files /dev/null and b/src/main/webapp/documents/images/format/CarbonData_logo.png differ http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/blob/6b9f3f2c/src/main/webapp/documents/images/format/carbon_data_file_structure_new.png ---------------------------------------------------------------------- diff --git a/src/main/webapp/documents/images/format/carbon_data_file_structure_new.png b/src/main/webapp/documents/images/format/carbon_data_file_structure_new.png new file mode 100755 index 0000000..3f9241b Binary files /dev/null and b/src/main/webapp/documents/images/format/carbon_data_file_structure_new.png differ http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/blob/6b9f3f2c/src/main/webapp/documents/images/format/carbon_data_format_new.png ---------------------------------------------------------------------- diff --git a/src/main/webapp/documents/images/format/carbon_data_format_new.png b/src/main/webapp/documents/images/format/carbon_data_format_new.png new file mode 100755 index 0000000..9d0b194 Binary files /dev/null and b/src/main/webapp/documents/images/format/carbon_data_format_new.png differ http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/blob/6b9f3f2c/src/main/webapp/documents/images/format/carbon_data_full_scan.png ---------------------------------------------------------------------- diff --git a/src/main/webapp/documents/images/format/carbon_data_full_scan.png b/src/main/webapp/documents/images/format/carbon_data_full_scan.png new file mode 100755 index 0000000..46715e7 Binary files /dev/null and b/src/main/webapp/documents/images/format/carbon_data_full_scan.png differ http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/blob/6b9f3f2c/src/main/webapp/documents/images/format/carbon_data_motivation.png ---------------------------------------------------------------------- diff --git a/src/main/webapp/documents/images/format/carbon_data_motivation.png b/src/main/webapp/documents/images/format/carbon_data_motivation.png new file mode 100755 index 0000000..6e454c6 Binary files /dev/null and b/src/main/webapp/documents/images/format/carbon_data_motivation.png differ http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/blob/6b9f3f2c/src/main/webapp/documents/images/format/carbon_data_olap_scan.png ---------------------------------------------------------------------- diff --git a/src/main/webapp/documents/images/format/carbon_data_olap_scan.png b/src/main/webapp/documents/images/format/carbon_data_olap_scan.png new file mode 100755 index 0000000..c1dfb18 Binary files /dev/null and b/src/main/webapp/documents/images/format/carbon_data_olap_scan.png differ http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/blob/6b9f3f2c/src/main/webapp/documents/images/format/carbon_data_random_scan.png ---------------------------------------------------------------------- diff --git a/src/main/webapp/documents/images/format/carbon_data_random_scan.png b/src/main/webapp/documents/images/format/carbon_data_random_scan.png new file mode 100755 index 0000000..7d44d34 Binary files /dev/null and b/src/main/webapp/documents/images/format/carbon_data_random_scan.png differ