I have a setup which looks sort of like this:
user: {
data : {
name
email
}
address : {
city
state
}
}
So data and address are super columns in the user column family…
What I really want is a mix of columns and super columns, such as:
user: {
name
email
address : {
city
state
}
Is this even possible with cassandra?
First, you cannot mix standard and super columns in one CF. Each CF must be specified as standard or super. Second, you should avoid supercolumns as they are effectively deprecated. Instead, you can achieve this specific data model using a standard CF and storing the address fields using composite columns, like this:
This would allow you to store different address schemes, but be able to query them as a group of columns. I presume this is your objective.