What Should I Do If a Job for Synchronizing Data from Kafka to DLI in Real Time Fails and "Array element access needs an index starting at 1 but was 0" Is Displayed?
Symptom
A job for synchronizing data from Kafka to DLI in real time fails and "Array element access needs an index starting at 1 but was 0" is displayed.

Possible Cause
The error message indicates that the array subscript must start from 1, and a[1] indicates the first element in the array.
Check the CDM real-time job. The migration source is Kafka, destination is the mapped DLI field, value source is the source table field, and value is a[0] (the nested JSON array in the Kafka message). When the source table field is used to assign a value to a destination column during field mapping, the array subscript must start from 1 (indicating the first element of the array). If subscript 0 is used by mistake, the job will fail. The error was caused by the incorrect subscript of the assignment array. You need to reset it.

Solution
Change the value of the field to a[1], submit the job version, and restart the job.

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.
For any further questions, feel free to contact us through the chatbot.
Chatbot