You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by da...@apache.org on 2023/02/28 10:11:37 UTC

[hudi] branch asf-site updated: [HUDI-4849][DOCS] Remove default value for mandatory record key field (#8055)

This is an automated email from the ASF dual-hosted git repository.

danny0405 pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/hudi.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new e7bbd358141 [HUDI-4849][DOCS] Remove default value for mandatory record key field (#8055)
e7bbd358141 is described below

commit e7bbd35814195e4eaee5826896e46c87bfa26447
Author: Kunni <13...@qq.com>
AuthorDate: Tue Feb 28 18:11:27 2023 +0800

    [HUDI-4849][DOCS] Remove default value for mandatory record key field (#8055)
    
    In HUDI-4071, the primary key becomes mandatory.
---
 website/docs/basic_configurations.md                  |  2 +-
 website/docs/quick-start-guide.md                     | 17 +++++++++--------
 .../version-0.13.0/basic_configurations.md            |  2 +-
 .../version-0.13.0/quick-start-guide.md               | 19 ++++++++++---------
 4 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/website/docs/basic_configurations.md b/website/docs/basic_configurations.md
index 8230e2a2fcd..cd9a406043a 100644
--- a/website/docs/basic_configurations.md
+++ b/website/docs/basic_configurations.md
@@ -74,7 +74,7 @@ Options useful for writing tables via `write.format.option(...)`
 > Record key field. Value to be used as the `recordKey` component of `HoodieKey`.
 Actual value will be obtained by invoking .toString() on the field value. Nested fields can be specified using
 the dot notation eg: `a.b.c`<br></br>
-> **Default Value**: uuid (Optional)<br></br>
+> **Default Value**:  N/A (Required)<br></br>
 > `Config Param: RECORDKEY_FIELD`<br></br>
 
 ---
diff --git a/website/docs/quick-start-guide.md b/website/docs/quick-start-guide.md
index 7b6ad03a3bf..2d14f973a7f 100644
--- a/website/docs/quick-start-guide.md
+++ b/website/docs/quick-start-guide.md
@@ -270,23 +270,24 @@ Spark SQL needs an explicit create table command.
 1. Since Hudi 0.10.0, `primaryKey` is required. It aligns with Hudi DataSource writer’s and resolves behavioural
    discrepancies reported in previous versions. Non-primary-key tables are no longer supported. Any Hudi table created
    pre-0.10.0 without a `primaryKey` needs to be re-created with a `primaryKey` field with 0.10.0.
-2. Similar to `hoodie.datasource.write.recordkey.field`, `uuid` is used as primary key by default; if that's the case
-   for your table, you can skip setting `primaryKey` in `tblproperties`.
-3. `primaryKey`, `preCombineField`, and `type` are case-sensitive.
-4. `preCombineField` is required for MOR tables.
-5. When set `primaryKey`, `preCombineField`, `type` or other Hudi configs, `tblproperties` is preferred over `options`.
-6. A new Hudi table created by Spark SQL will by default set `hoodie.datasource.write.hive_style_partitioning=true`.
+2. `primaryKey`, `preCombineField`, and `type` are case-sensitive.
+3. `preCombineField` is required for MOR tables. 
+4. When set `primaryKey`, `preCombineField`, `type` or other Hudi configs, `tblproperties` is preferred over `options`. 
+5. A new Hudi table created by Spark SQL will by default set `hoodie.datasource.write.hive_style_partitioning=true`.
 :::
 
 **Create a Non-Partitioned Table**
 
 ```sql
--- create a cow table, with default primaryKey 'uuid' and without preCombineField provided
+-- create a cow table, with primaryKey 'uuid' and without preCombineField provided
 create table hudi_cow_nonpcf_tbl (
   uuid int,
   name string,
   price double
-) using hudi;
+) using hudi
+tblproperties (
+  primaryKey = 'uuid'
+);
 
 
 -- create a mor non-partitioned table with preCombineField provided
diff --git a/website/versioned_docs/version-0.13.0/basic_configurations.md b/website/versioned_docs/version-0.13.0/basic_configurations.md
index 8230e2a2fcd..50e4cb9154b 100644
--- a/website/versioned_docs/version-0.13.0/basic_configurations.md
+++ b/website/versioned_docs/version-0.13.0/basic_configurations.md
@@ -74,7 +74,7 @@ Options useful for writing tables via `write.format.option(...)`
 > Record key field. Value to be used as the `recordKey` component of `HoodieKey`.
 Actual value will be obtained by invoking .toString() on the field value. Nested fields can be specified using
 the dot notation eg: `a.b.c`<br></br>
-> **Default Value**: uuid (Optional)<br></br>
+> **Default Value**: N/A (Required)<br></br>
 > `Config Param: RECORDKEY_FIELD`<br></br>
 
 ---
diff --git a/website/versioned_docs/version-0.13.0/quick-start-guide.md b/website/versioned_docs/version-0.13.0/quick-start-guide.md
index 7b6ad03a3bf..f1b54bc5e04 100644
--- a/website/versioned_docs/version-0.13.0/quick-start-guide.md
+++ b/website/versioned_docs/version-0.13.0/quick-start-guide.md
@@ -270,23 +270,24 @@ Spark SQL needs an explicit create table command.
 1. Since Hudi 0.10.0, `primaryKey` is required. It aligns with Hudi DataSource writer’s and resolves behavioural
    discrepancies reported in previous versions. Non-primary-key tables are no longer supported. Any Hudi table created
    pre-0.10.0 without a `primaryKey` needs to be re-created with a `primaryKey` field with 0.10.0.
-2. Similar to `hoodie.datasource.write.recordkey.field`, `uuid` is used as primary key by default; if that's the case
-   for your table, you can skip setting `primaryKey` in `tblproperties`.
-3. `primaryKey`, `preCombineField`, and `type` are case-sensitive.
-4. `preCombineField` is required for MOR tables.
-5. When set `primaryKey`, `preCombineField`, `type` or other Hudi configs, `tblproperties` is preferred over `options`.
-6. A new Hudi table created by Spark SQL will by default set `hoodie.datasource.write.hive_style_partitioning=true`.
-:::
+2. `primaryKey`, `preCombineField`, and `type` are case-sensitive.
+3. `preCombineField` is required for MOR tables.
+4. When set `primaryKey`, `preCombineField`, `type` or other Hudi configs, `tblproperties` is preferred over `options`.
+5. A new Hudi table created by Spark SQL will by default set `hoodie.datasource.write.hive_style_partitioning=true`.
+   :::
 
 **Create a Non-Partitioned Table**
 
 ```sql
--- create a cow table, with default primaryKey 'uuid' and without preCombineField provided
+-- create a cow table, with primaryKey 'uuid' and without preCombineField provided
 create table hudi_cow_nonpcf_tbl (
   uuid int,
   name string,
   price double
-) using hudi;
+) using hudi
+tblproperties (
+  primaryKey = 'uuid'
+);
 
 
 -- create a mor non-partitioned table with preCombineField provided