Hi all!

Currently I’m unwinding the data that I write into MongoDB coming from a Map field so I leave the fields as top attributes:

Input:

{field: "sample", unwind_me: {field_a: "value_a", field_b: "value_b"}} > {field: "sample", field_a: "value_a", "field_b": "field_b"}

I’m using those fields after a $match stage, in the $group I do as follows: field_a: $field_a.

However, those values are dynamic and don’t really have a predefined set of fields so they can vary with time… I was thinking of sending them into a Document type column so I can do as follows in the $group stage: field_a: $document_field.field_a.

I’ve seen that the average document size remains the same. So I’m wondering… Is there any big con going with this approach?