Help Center/
MapReduce Service/
Component Operation Guide (LTS) (Ankara Region)/
Using Hudi/
Common Issues About Hudi/
Data Collection/
HoodieKeyException Is Reported When Data Is Collected
Updated on 2024-11-29 GMT+08:00
HoodieKeyException Is Reported When Data Is Collected
Question
Is it possible to use a nullable field that contains null records as a primary key when creating a Hudi table?
Answer
No. HoodieKeyException will be thrown.
Caused by: org.apache.hudi.exception.HoodieKeyException: recordKey value: "null" for field: "name" cannot be null or empty. at org.apache.hudi.keygen.SimpleKeyGenerator.getKey(SimpleKeyGenerator.java:58) at org.apache.hudi.HoodieSparkSqlWriter$$anonfun$1.apply(HoodieSparkSqlWriter.scala:104) at org.apache.hudi.HoodieSparkSqlWriter$$anonfun$1.apply(HoodieSparkSqlWriter.scala:100)
Parent topic: Data Collection
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot