MongoDB (v2 - Java) connector is not extracting the raw data from the database #6498
Labels
area/connectors
Connector related issues
connectors/source/mongodb
connectors/sources-database
type/bug
Something isn't working
Enviroment
Current Behavior
I'm currently facing issues with Source MongoDB (v2 - java version) connector as the data is not exported as raw/same as in DB. The connector converts nested object columns to string and an array of objects are converted as Document{}. Since this is a critical source for us, we want this to rectify asap. Also in the meantime, I have planned to develop our own custom connector in python since I'm not proficient in Java.
MongoDB:
{"_id": "61431b7c9f28c41b367d5205", "index": 8, "guid": "812e3e02-b468-4842-b20e-d05c89166302", "isActive": true, "balance": "$1,207.39", "picture": "http://placehold.it/32x32", "age": 26, "array_col": ["adipisicing", "amet", "dolor", "consequat", "esse", "laboris", "dolor"], "object_array_col": [{"id": 0, "name": "Hunter Curry"}], "object_col": {"id": 8, "wording": "nulla"}, "greeting": "Hello, undefined! You have 10 unread messages.", "favoriteFruit": "banana", "updatedAt": "2021-09-08T06:45:37.431000Z"}
Airbyte:
{"_id":"61431b7c9f28c41b367d5205","index":8,"guid":"812e3e02-b468-4842-b20e-d05c89166302","isActive":true,"balance":"$1,207.39","picture":"http://placehold.it/32x32","age":26,"array_col":"[adipisicing, amet, dolor, consequat, esse, laboris, dolor]","object_array_col":"[Document{{id=0, name=Hunter Curry}}]","object_col":"{\"id\": 8, \"wording\": \"nulla\"}","greeting":"Hello, undefined! You have 10 unread messages.","favoriteFruit":"banana","updatedAt":"2021-09-08T12:15:37Z"}
Expected Behavior
The expected result is to export the actual data from MongoDB without doing any datatype conversion.
Expected Airbyte record:
{"_id": "61431b7c9f28c41b367d5205", "index": 8, "guid": "812e3e02-b468-4842-b20e-d05c89166302", "isActive": true, "balance": "$1,207.39", "picture": "http://placehold.it/32x32", "age": 26, "array_col": ["adipisicing", "amet", "dolor", "consequat", "esse", "laboris", "dolor"], "object_array_col": [{"id": 0, "name": "Hunter Curry"}], "object_col": {"id": 8, "wording": "nulla"}, "greeting": "Hello, undefined! You have 10 unread messages.", "favoriteFruit": "banana", "updatedAt": "2021-09-08T06:45:37.431000Z"}
Steps to Reproduce
docker run --rm --init -i -v airbyte_workspace:/data -v /tmp/airbyte_local:/local -w /data/{workspace} --network host --log-driver none airbyte/source-mongodb-v2:0.1.0 read --config source_config.json --catalog source_catalog.json
Are you willing to submit a PR? Since I'm not proficient in Java, I'm unable to figure the issue in code.
The text was updated successfully, but these errors were encountered: