Is there a common workaround to have multiple data types in a MAP in Flink SQL?
In general the data structure should remain the same, inside the body is a map with multiple values. No nested fields should be added or anything. I already tried using multiple maps or using a MultiSet and some things like that but unfortunately i did not succeed.
My flink statement looks something like this:
ARRAY[
ROW(
...
-- Body
map [
'Entry1', Entry1,
'Entry2', Entry2,
'Entry3', Entry3
]
)
] compositeRequest
These are just dummy entries and not real ones obviously.
My body of the schema looks like this:
{
"default": null,
"name": "body",
"type": [
"null",
{
"type": "map",
"values": [
"null",
"string"
]
}
]
}
It can also happen that one of the entries is null, but this is already in my schema.
In general the data structure should remain the same, inside the body is a map with multiple values. No nested fields should be added or anything. I already tried using multiple maps or using a MultiSet and some things like that but unfortunately i did not succeed.
TechNoobie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.