Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion website/docs/basic_configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default primary key uuid is broken now?

Copy link
Contributor Author

@lvyanquan lvyanquan Feb 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for this incorrect change, this configuration has not been changed in Flink but default value 'uuid' was removed since this pr-6681 in Spark.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we fix the other version also?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have checked again, Default value change of 'hoodie.datasource.write.recordkey.field' was introduced only in lately release-0.13.0 and wasn't changed in release-0.12.2.
so no more versions to be fixed.


---
Expand Down
17 changes: 9 additions & 8 deletions website/docs/quick-start-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>

---
Expand Down
19 changes: 10 additions & 9 deletions website/versioned_docs/version-0.13.0/quick-start-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down