Skip to content

Commit 0d73341

Browse files
authored
[HUDI-4580][DOCS] Update docs of Spark SQL create table statement (#6402)
1 parent 7a30cec commit 0d73341

6 files changed

Lines changed: 9 additions & 48 deletions

File tree

website/docs/quick-start-guide.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -325,16 +325,8 @@ We can create a table on an existing hudi table(created with spark-shell or delt
325325
read/write to/from a pre-existing hudi table.
326326

327327
```sql
328-
-- create an external hudi table based on an existing path
329-
330-
-- for non-partitioned table
331-
create table hudi_existing_tbl0 using hudi
332-
location 'file:///tmp/hudi/dataframe_hudi_nonpt_table';
333-
334-
-- for partitioned table
335-
create table hudi_existing_tbl1 using hudi
336-
partitioned by (dt, hh)
337-
location 'file:///tmp/hudi/dataframe_hudi_pt_table';
328+
create table hudi_existing_tbl using hudi
329+
location '/tmp/hudi/hudi_existing_table';
338330
```
339331

340332
:::tip

website/docs/table_management.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,7 @@ You can create an External table using the `location` statement. If an external
9898
An external table is useful if you need to read/write to/from a pre-existing hudi table.
9999

100100
```sql
101-
create table h_p1 using hudi
102-
options (
103-
primaryKey = 'id',
104-
preCombineField = 'ts'
105-
)
106-
partitioned by (dt)
101+
create table h_p1 using hudi
107102
location '/path/to/hudi';
108103
```
109104

website/versioned_docs/version-0.11.0/quick-start-guide.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -299,16 +299,8 @@ We can create a table on an existing hudi table(created with spark-shell or delt
299299
read/write to/from a pre-existing hudi table.
300300

301301
```sql
302-
-- create an external hudi table based on an existing path
303-
304-
-- for non-partitioned table
305-
create table hudi_existing_tbl0 using hudi
306-
location 'file:///tmp/hudi/dataframe_hudi_nonpt_table';
307-
308-
-- for partitioned table
309-
create table hudi_existing_tbl1 using hudi
310-
partitioned by (dt, hh)
311-
location 'file:///tmp/hudi/dataframe_hudi_pt_table';
302+
create table hudi_existing_tbl using hudi
303+
location '/tmp/hudi/hudi_existing_table';
312304
```
313305

314306
:::tip

website/versioned_docs/version-0.11.0/table_management.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,7 @@ You can create an External table using the `location` statement. If an external
9898
An external table is useful if you need to read/write to/from a pre-existing hudi table.
9999

100100
```sql
101-
create table h_p1 using hudi
102-
options (
103-
primaryKey = 'id',
104-
preCombineField = 'ts'
105-
)
106-
partitioned by (dt)
101+
create table h_p1 using hudi
107102
location '/path/to/hudi';
108103
```
109104

website/versioned_docs/version-0.11.1/quick-start-guide.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -299,16 +299,8 @@ We can create a table on an existing hudi table(created with spark-shell or delt
299299
read/write to/from a pre-existing hudi table.
300300

301301
```sql
302-
-- create an external hudi table based on an existing path
303-
304-
-- for non-partitioned table
305-
create table hudi_existing_tbl0 using hudi
306-
location 'file:///tmp/hudi/dataframe_hudi_nonpt_table';
307-
308-
-- for partitioned table
309-
create table hudi_existing_tbl1 using hudi
310-
partitioned by (dt, hh)
311-
location 'file:///tmp/hudi/dataframe_hudi_pt_table';
302+
create table hudi_existing_tbl using hudi
303+
location '/tmp/hudi/hudi_existing_table';
312304
```
313305

314306
:::tip

website/versioned_docs/version-0.11.1/table_management.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,7 @@ You can create an External table using the `location` statement. If an external
9898
An external table is useful if you need to read/write to/from a pre-existing hudi table.
9999

100100
```sql
101-
create table h_p1 using hudi
102-
options (
103-
primaryKey = 'id',
104-
preCombineField = 'ts'
105-
)
106-
partitioned by (dt)
101+
create table h_p1 using hudi
107102
location '/path/to/hudi';
108103
```
109104

0 commit comments

Comments
 (0)