I have about ~20-30ish columns that I would need to store in my column family in total. However, my data comes in different variations. I have different objects that belong together logically but are not having the same fields (fields as in key names). Sometimes, 5 fields are provided, sometimes 7 fields and so on. All of them share a portion of fields that are always provided though.
A row I insert in this column family will never have all of the columns filled. When using a Map, I could add key/values based on the object type and will not have the possible overhead that is introduced by my other model.
I am concerned about having a lot of empty columns in each row.
A possible downside of using a Map is that you can't have an index for map keys and map values coexist.
Questions gathered:
map<text,text>
and cast the values within my application? I am using Cassandra 3.0.8 | CQL spec 3.4.0 | Native protocol v4
Thanks
I think that having sparse column values is totally fine since that's one of the reason why BigTable and all related solutions implementing the same sparse map data model were created for.
I will be more concerned about limitations in the use of cql collections instead, as pointed out in another S.O. answer here.
Regarding your specific questions:
Anyway, You can find some info about Cassandra's limitations here. It's an old page, but I assume you can use them as lower bounds for the updated values.
Hope it helps.