I tried reading blogs and datastax documentation but couldn't find any specific ones on this
Is there a way to save 2 tables in Kassandra so that they belong to the same partition? For instance:
CREATE TYPE addr ( street_address1 text, city text, state text, country text, zip_code text, ); CREATE TABLE foo ( account_id timeuuid, data text, site_id int, PRIMARY KEY (account_id) }; CREATE TABLE bar ( account_id timeuuid, address_id int, address frozen<addr>, PRIMARY KEY (account_id, address_id) );
Here I need to make sure that both of these / CF tables will live on the same partition this way for the same account. Both of these datasets can be extracted from the same node.
Any pointers are highly appreciated.
Also, if anyone has experience using UDT (User Defined Types), I would like to understand how backward compatibility will work. If I modify the UDT "addr" to have a few more attributes (for example, zip_code2 int and name text), how do the older lines that have this attribute work? Is it even compatible?
thanks
source share