Quang Dang Vu Nhat
06/20/2023, 3:00 AMmerge_request_commits schema
"approvals_before_merge": {
"type": ["null", "boolean", "string", "object"]
},
or in Pipedrive product_fields schema
"options": {
"type": ["null", "array"],
"items": {
"type": "object",
"properties": {
"id": {
"type": ["null", "boolean", "integer"]
},
"label": {
"type": ["null", "string"]
}
}
}
}
I don’t see how they handle multiple datatype in their code, apart from these declaration,
Can anyone support me with this 🙇kapa.ai
06/20/2023, 3:00 AMkapa.ai
06/20/2023, 3:00 AMtype property with an array of types, like "type": ["null", "boolean", "string", "object"]. When it comes to handling these fields in the destination, it's the destination connector's responsibility to handle the different data types. According to the [supported data types documentation](https://docs.airbyte.com/understanding-airbyte/supported-data-types#unions), destinations must handle this case, either using a native union type or by finding a native type that can accept all of the source's types (this frequently will be string or json). In some cases, sources may want to use multiple types for the same field using JSON schema's oneOf type. However, many destinations do not currently support these types and may not behave as expected. In summary, you can define multiple data types for a field in your custom connector's schema, and it's up to the destination connector to handle the different data types appropriately.