Skip to content

Commit 3efd330

Browse files
xubo245chenliang613
authored andcommitted
[CARBONDATA-1372] Update the documentation
This closes apache#1252
1 parent d25fee2 commit 3efd330

4 files changed

+35
-38
lines changed

docs/ddl-operation-on-carbondata.md

+28-31
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ The following DDL operations are supported in CarbonData :
5050

5151
| Parameter | Description | Optional |
5252
|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------|----------|
53-
| db_name | Name of the database. Database name should consist of alphanumeric characters and underscore(\_) special character. | Yes |
54-
| field_list | Comma separated List of fields with data type. The field names should consist of alphanumeric characters and underscore(\_) special character. | No |
55-
| table_name | The name of the table in Database. Table Name should consist of alphanumeric characters and underscore(\_) special character. | No |
56-
| STORED BY | "org.apache.carbondata.format", identifies and creates a CarbonData table. | No |
57-
| TBLPROPERTIES | List of CarbonData table properties. | |
53+
| db_name | Name of the database. Database name should consist of alphanumeric characters and underscore(\_) special character. | YES |
54+
| field_list | Comma separated List of fields with data type. The field names should consist of alphanumeric characters and underscore(\_) special character. | NO |
55+
| table_name | The name of the table in Database. Table name should consist of alphanumeric characters and underscore(\_) special character. | NO |
56+
| STORED BY | "org.apache.carbondata.format", identifies and creates a CarbonData table. | NO |
57+
| TBLPROPERTIES | List of CarbonData table properties. | YES |
5858

5959
### Usage Guidelines
6060

@@ -151,7 +151,7 @@ The following DDL operations are supported in CarbonData :
151151
### Parameter Description
152152
| Parameter | Description | Optional |
153153
|------------|-------------------------------------------------------------------------------------------|----------|
154-
| IN db_Name | Name of the database. Required only if tables of this specific database are to be listed. | Yes |
154+
| IN db_Name | Name of the database. Required only if tables of this specific database are to be listed. | YES |
155155

156156
### Example:
157157
```
@@ -170,11 +170,11 @@ This command is used to rename the existing table.
170170
```
171171

172172
#### Parameter Description
173-
| Parameter | Description |
174-
|---------------|-----------------------------------------------------------------------------------------------|
175-
| db_Name | Name of the database. If this parameter is left unspecified, the current database is selected.|
176-
|table_name | Name of the existing table. |
177-
|new_table_name | New table name for the existing table. |
173+
| Parameter | Description | Optional |
174+
|---------------|-----------------------------------------------------------------------------------------------|----------|
175+
| db_Name | Name of the database. If this parameter is left unspecified, the current database is selected.| YES |
176+
|table_name | Name of the existing table. | NO |
177+
|new_table_name | New table name for the existing table. | NO |
178178

179179
#### Usage Guidelines
180180

@@ -204,11 +204,11 @@ This command is used to add a new column to the existing table.
204204
```
205205

206206
#### Parameter Description
207-
| Parameter | Description |
208-
|--------------------|-----------------------------------------------------------------------------------------------------------|
209-
| db_Name | Name of the database. If this parameter is left unspecified, the current database is selected. |
210-
| table_name | Name of the existing table. |
211-
| col_name data_type | Name of comma-separated column with data type. Column names contain letters, digits, and underscores (\_). |
207+
| Parameter | Description |Optional|
208+
|------------------|-----------------------------------------------------------------------------------------------------------|------------|
209+
|db_Name | Name of the database. If this parameter is left unspecified, the current database is selected. |YES|
210+
|table_name | Name of the existing table. |NO |
211+
|col_name data_type| Name of comma-separated column with data type. Column names contain letters, digits, and underscores (\_). |NO |
212212

213213
NOTE: Do not name the column after name, tupleId, PositionId, and PositionReference when creating Carbon tables because they are used internally by UPDATE, DELETE, and secondary index.
214214

@@ -251,11 +251,11 @@ This command is used to delete a existing column or multiple columns in a table.
251251
```
252252

253253
#### Parameter Description
254-
| Parameter | Description |
255-
|------------|----------------------------------------------------------------------------------------------------------|
256-
| db_Name | Name of the database. If this parameter is left unspecified, the current database is selected. |
257-
| table_name | Name of the existing table. |
258-
| col_name | Name of comma-separated column with data type. Column names contain letters, digits, and underscores (\_) |
254+
| Parameter | Description | Optional |
255+
|------------|----------------------------------------------------------------------------------------------------------|----------|
256+
| db_Name | Name of the database. If this parameter is left unspecified, the current database is selected. | YES |
257+
| table_name | Name of the existing table. | NO |
258+
| col_name | Name of comma-separated column with data type. Column names contain letters, digits, and underscores (\_) | NO |
259259

260260
#### Usage Guidelines
261261

@@ -281,12 +281,9 @@ If the table contains 4 columns namely a1, b1, c1, and d1.
281281
- **To delete multiple columns:**
282282

283283
```
284-
ALTER TABLE carbon DROP COLUMNS (b1,c1);
284+
ALTER TABLE carbon DROP COLUMNS (c1,d1);
285285
```
286286

287-
```
288-
ALTER TABLE carbon DROP COLUMNS (b1,c1);
289-
```
290287

291288
### **CHANGE DATA TYPE**
292289

@@ -298,12 +295,12 @@ This command is used to change the data type from INT to BIGINT or decimal preci
298295
```
299296

300297
#### Parameter Description
301-
| Parameter | Description |
302-
|---------------------|-----------------------------------------------------------------------------------------------------------|
303-
| db_Name | Name of the database. If this parameter is left unspecified, the current database is selected. |
304-
| table_name | Name of the existing table. |
305-
| col_name | Name of comma-separated column with data type. Column names contain letters, digits, and underscores (\_). |
306-
| changed_column_type | The change in the data type. |
298+
| Parameter | Description |Optional|
299+
|---------------------|-----------------------------------------------------------------------------------------------------------|-------|
300+
| db_Name | Name of the database. If this parameter is left unspecified, the current database is selected. | YES |
301+
| table_name | Name of the existing table. | NO |
302+
| col_name | Name of comma-separated column with data type. Column names contain letters, digits, and underscores (\_). | NO |
303+
| changed_column_type | The change in the data type. | NO |
307304

308305
#### Usage Guidelines
309306

docs/dml-operation-on-carbondata.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ SHOW SEGMENTS FOR Table [db_name.]table_name LIMIT number_of_segments
305305
After you retrieve the segment ID of the segment that you want to delete, execute the following command to delete the selected segment.
306306
307307
```
308-
DELETE FROM TABLE [db_name.]table_name WHERE SEGMENT.ID IN (segment_id1, segments_id2, ....)
308+
DELETE FROM TABLE [db_name.]table_name WHERE SEGMENT.ID IN (segment_id1, segments_id2, ...)
309309
```
310310
311311
### Parameter Description
@@ -356,15 +356,15 @@ This command will allow to update the carbon table based on the column expressio
356356
```
357357
UPDATE <table_name>
358358
SET (column_name1, column_name2, ... column_name n) =
359-
(column1_expression , column2_expression . .. column n_expression )
359+
(column1_expression , column2_expression, ... column n_expression )
360360
[ WHERE { <filter_condition> } ];
361361
```
362362
363363
alternatively the following the command can also be used for updating the CarbonData Table :
364364
365365
```
366366
UPDATE <table_name>
367-
SET (column_name1, column_name2,) =
367+
SET (column_name1, column_name2) =
368368
(select sourceColumn1, sourceColumn2 from sourceTable
369369
[ WHERE { <filter_condition> } ] )
370370
[ WHERE { <filter_condition> } ];
@@ -478,7 +478,7 @@ column1 = 'USA');
478478
```
479479
480480
```
481-
DELETE FROM columncarbonTable1 WHERE column2 >= 4
481+
DELETE FROM columncarbonTable1 WHERE column2 >= 4;
482482
```
483483
484484
**The Status Success/Failure shall be captured in the driver log and the client.**

docs/installation-guide.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ To get started with CarbonData : [Quick Start](quick-start-guide.md), [DDL Opera
9696

9797
2. Copy the `./conf/carbon.properties.template` file from CarbonData repository to `$SPARK_HOME/conf/` folder and rename the file to `carbon.properties`.
9898

99-
3. Create `tar,gz` file of carbonlib folder and move it inside the carbonlib folder.
99+
3. Create `tar.gz` file of carbonlib folder and move it inside the carbonlib folder.
100100

101101
```
102102
cd $SPARK_HOME

docs/quick-start-guide.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ scala>carbon.sql("CREATE TABLE
8484
###### Loading Data to a Table
8585

8686
```
87-
scala>carbon.sql("LOAD DATA INPATH 'sample.csv file path'
87+
scala>carbon.sql("LOAD DATA INPATH '/path/to/sample.csv'
8888
INTO TABLE test_table")
8989
```
9090
**NOTE**: Please provide the real file path of `sample.csv` for the above script.
@@ -153,7 +153,7 @@ scala>cc.sql("LOAD DATA INPATH 'sample.csv file path'
153153
```
154154
**NOTE**: Please provide the real file path of `sample.csv` for the above script.
155155

156-
###### Query Data from a Table
156+
###### Querying Data from a Table
157157

158158
```
159159
scala>cc.sql("SELECT * FROM test_table").show()

0 commit comments

Comments
 (0)