<@U04S8PLJWMT> on mongodb source we have multiple ...
# ask-ai
c
@kapa.ai on mongodb source we have multiple keys with ObjectId in values does that affect airbyte syncing? we're currently getting the 'Failure in source: Only _id fields with the following types are currently supported: objectId, string, int, long, binData (collection = objs).' error.
k
The error message you're seeing—"Failure in source: Only _id fields with the following types are currently supported: objectId, string, int, long, binData (collection = objs)"—is related specifically to the type of the
_id
field in your MongoDB collections, not to other fields that may contain
ObjectId
values. According to the Airbyte MongoDB source connector documentation, all documents within a collection must have their
_id
field of the same type, and only the following types are supported for `_id`:
objectId
,
string
,
int
,
long
, and
binData
. If your collection contains documents where the
_id
field is of a different or mixed type, Airbyte will fail to sync that collection and produce the error you're seeing. This limitation does not apply to other fields in your documents that may contain
ObjectId
values—only the
_id
field is relevant for this check. So, having multiple keys with
ObjectId
values elsewhere in your documents does not affect syncing. The issue is strictly with the type of the
_id
field in the collection you are trying to sync. To resolve this, ensure that all documents in the affected collection have their
_id
field set to one of the supported types and that the type is consistent across all documents in the collection. For more details, see the connector limitations in the official documentation: [MongoDB Source Connector Limitations](https://docs.airbyte.com/integrations/sources/mongodb-v2/mongodb-v2-troubleshooting#connector-limitations).