You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@carbondata.apache.org by ch...@apache.org on 2021/12/20 14:55:54 UTC
[carbondata] 10/14: Revert "Supplementary information for add segment syntax ."
This is an automated email from the ASF dual-hosted git repository.
chenliang613 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/carbondata.git
commit f544e59de1b75cf595f0b194928a8fb255928bca
Author: bieremayi <li...@sina.com>
AuthorDate: Tue Dec 7 17:07:39 2021 +0800
Revert "Supplementary information for add segment syntax ."
This reverts commit 81c2e29604d66e35f3757122cbc7cda0ed463cac.
---
docs/addsegment-guide.md | 42 +++-----------------------------
docs/segment-management-on-carbondata.md | 3 +--
2 files changed, 4 insertions(+), 41 deletions(-)
diff --git a/docs/addsegment-guide.md b/docs/addsegment-guide.md
index 648c426..78b15e6 100644
--- a/docs/addsegment-guide.md
+++ b/docs/addsegment-guide.md
@@ -27,46 +27,10 @@ Heterogeneous format segments aims to solve this problem by avoiding data conver
### Add segment with path and format
Users can add the existing data as a segment to the carbon table provided the schema of the data
and the carbon table should be the same.
-
- Syntax
-
- ```
- ALTER TABLE [db_name.]table_name ADD SEGMENT OPTIONS(property_name=property_value, ...)
- ```
-
-**Supported properties:**
-
-| Property | Description |
-| ------------------------------------------------------------ | ------------------------------------------------------------ |
-| [PATH](#path) | User external old table path |
-| [FORMAT](#format) | User external old table file format |
-| [PARTITION](#partition) | Extract partition info for partition table , should be form of "a:int, b:string" |
-
-
--
- You can use the following options to add segment:
-
- - ##### PATH:
- User old table path.
-
- ```
- OPTIONS('PATH'='hdfs://usr/oldtable')
- ```
-
- - ##### FORMAT:
- User old table file format. eg : json, parquet, jdbc, orc, csv, text
-
- ```
- OPTIONS('FORMAT'='parquet')
- ```
- - ##### PARTITION:
- Extract partition info for partition table , should be form of "a:int, b:string"
-
- ```
- OPTIONS('PARTITION'='a:int, b:string')
- ```
-
+```
+alter table table_name add segment options ('path'= 'hdfs://usr/oldtable','format'='parquet')
+```
In the above command user can add the existing data to the carbon table as a new segment and also
can provide the data format.
diff --git a/docs/segment-management-on-carbondata.md b/docs/segment-management-on-carbondata.md
index ef01799..6c144b1 100644
--- a/docs/segment-management-on-carbondata.md
+++ b/docs/segment-management-on-carbondata.md
@@ -25,7 +25,6 @@ concept which helps to maintain consistency of data and easy transaction managem
- [Delete Segment by ID](#delete-segment-by-id)
- [Delete Segment by Date](#delete-segment-by-date)
- [Query Data with Specified Segments](#query-data-with-specified-segments)
-- [Add Segment](./addsegment-guide.md)
### SHOW SEGMENT
@@ -208,4 +207,4 @@ concept which helps to maintain consistency of data and easy transaction managem
spark.sql("select count(empno) from carbon.input.segments.db.carbontable_Multi_Thread").show();
}
}
- ```
\ No newline at end of file
+ ```