[DOCS] Update Key generation page#9486
Conversation
website/docs/key_generation.md
Outdated
| | ---------------------------------------------------------------------------------------- |------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| | hoodie.datasource.write.recordkey.field | N/A (Optional) | Record key field. Value to be used as the `recordKey` component of `HoodieKey`. <ul><li>When configured, 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`. </li><li>When not configured record key will be automatically generated by Hudi.</li></ul> <br />`Config Param: RECORDKEY_FIELD_NAME` | | ||
| | hoodie.datasource.write.partitionpath.field | N/A (Optional) | Partition path field. Value to be used at the partitionPath component of HoodieKey. This needs to be specified if a partitioned table is desired. Actual value obtained by invoking .toString()<br />`Config Param: PARTITIONPATH_FIELD_NAME` | | ||
| | hoodie.datasource.write.keygenerator.class | N/A (Optional) | Key generator class, that implements `org.apache.hudi.keygen.KeyGenerator` extract a key out of incoming records. <ul><li>When set, the configured value takes precedence to be in effect and automatic inference is not triggered.</li><li>When not configured, if `hoodie.datasource.write.keygenerator.type` is set, the configured value is used else automatic inference is triggered.</li><li>In case of auto generated record keys. the key generator type is automatically inferred.</li></ul> <br />`Config Param: KEYGENERATOR_CLASS_NAME` | |
There was a problem hiding this comment.
@nsivabalan please review and suggest edits on this part. I have edited it to cover for the auto key generation and auto inferencing part as well.
There was a problem hiding this comment.
looks good.
minor suggestion
In case of auto generated record keys, the configure key generator class/type will be used to determine the partition path generation. So, users can still configure a key generator class and skip configuring record key field (on which case, hudi will auto generate record keys).
There was a problem hiding this comment.
@nsivabalan For specifying partition path, the users should still configure the keygen class/type correct ? Or is it assumed to be non-partitioned if the key gen class is not provided ?
There was a problem hiding this comment.
hudi will auto infer partition path.
for eg, if not configured, hudi will assume its non-partitioned.
So, the key gen class is not strictly a mandatory field.
There was a problem hiding this comment.
Thanks for clarifying. Edited the smae. ptal
aaf56f2 to
9790ac9
Compare
f3cdc62 to
3bd0ea2
Compare
website/docs/key_generation.md
Outdated
| | ---------------------------------------------------------------------------------------- |------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| | hoodie.datasource.write.recordkey.field | N/A (Optional) | Record key field. Value to be used as the `recordKey` component of `HoodieKey`. <ul><li>When configured, 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`. </li><li>When not configured record key will be automatically generated by Hudi.</li></ul> <br />`Config Param: RECORDKEY_FIELD_NAME` | | ||
| | hoodie.datasource.write.partitionpath.field | N/A (Optional) | Partition path field. Value to be used at the partitionPath component of HoodieKey. This needs to be specified if a partitioned table is desired. Actual value obtained by invoking .toString()<br />`Config Param: PARTITIONPATH_FIELD_NAME` | | ||
| | hoodie.datasource.write.keygenerator.class | N/A (Optional) | Key generator class, that implements `org.apache.hudi.keygen.KeyGenerator` extract a key out of incoming records. <ul><li>When set, the configured value takes precedence to be in effect and automatic inference is not triggered.</li><li>When not configured, if `hoodie.datasource.write.keygenerator.type` is set, the configured value is used else automatic inference is triggered.</li><li>In case of auto generated record keys. the key generator type is automatically inferred.</li></ul> <br />`Config Param: KEYGENERATOR_CLASS_NAME` | |
There was a problem hiding this comment.
looks good.
minor suggestion
In case of auto generated record keys, the configure key generator class/type will be used to determine the partition path generation. So, users can still configure a key generator class and skip configuring record key field (on which case, hudi will auto generate record keys).
3bd0ea2 to
208d6c8
Compare
208d6c8 to
0acf760
Compare
0acf760 to
66f5920
Compare



Change Logs
doc changes for Key generator page
Impact
doc changes
Risk level (write none, low medium or high below)
low
Documentation Update
Describe any necessary documentation update if there is any new feature, config, or user-facing change
ticket number here and follow the instruction to make
changes to the website.
Contributor's checklist