alibaba / alibaba/DataX

【mongoReader】When I read mongodb data, Fields with null values were discarded, resulting in inconsistent field order

Open
#1,101 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
17.4k
Forks
5.7k
PR merge metrics
No merged PRs in 30d

Description

When I read mongodb data, Fields with null values were discarded, resulting in inconsistent field order

here is the mongo data
![image](https://user-images.githubusercontent.com/48348786/133878674-ba350949-6010-4789-9ea2-afbad9a3aa8d.png)

the follow is the json file:
![image](https://user-images.githubusercontent.com/48348786/133878704-28fbe6f8-4dde-4682-88e2-a6b94b45e56f.png)

You can see the index 4【PackageCode】is null。 The error log does not report this field
![image](https://user-images.githubusercontent.com/48348786/133878782-1fc22d69-11f9-489f-a8cd-17439b079ae6.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the mongoReader entry point and reproduce the issue using the MongoDB data and JSON shown in the report. Trace how null-valued fields are handled and compare the field order and error log with the expected records. Done means the null field is retained and field ordering remains consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, mongodb
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.